Skip to content

No error in the analyzer when call field of a record is invoked #59964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sgrekhov opened this issue Jan 23, 2025 · 0 comments
Open

No error in the analyzer when call field of a record is invoked #59964

sgrekhov opened this issue Jan 23, 2025 · 0 comments
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@sgrekhov
Copy link
Contributor

This issue is derieved from the test mentioned in #55803 (comment). The following code produces an error in CFE but no has issues in the analyzer.

({int Function(int) call}) rec = (call: (int x) => x);

main() {
  rec(42); // CFE Error: The 'call' property on the record type isn't directly callable but could be invoked by `.call(...)`
}

According to the #55803 (comment) there should be an error in the analyzer as well.

cc @lrhn

Dart SDK version: 3.8.0-21.0.dev (dev) (Tue Jan 21 20:02:01 2025 -0800) on "windows_x64"

@sgrekhov sgrekhov added legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jan 23, 2025
@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec labels Jan 23, 2025
@bwilkerson bwilkerson added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. and removed dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants