-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
cfe-dysfunctionalitiesIssues for the CFE not behaving as intendedIssues for the CFE not behaving as intendedlegacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
This issue derieved from the test mentioned in #55803 (comment). The following code produces an error in the analyzer but works in CFE
class BEC {}
extension on BEC {
int Function(int) get call => (int x) => x;
}
main() {
BEC()(42); // Analyzer error: The expression doesn't evaluate to a function, so it can't be invoked. invocation_of_non_function_expression
}
According to the #55803 (comment) there should be an error in the CFE as well.
cc @lrhn
Dart SDK version: 3.8.0-12.0.dev (dev) (Sun Jan 19 16:06:48 2025 -0800) on "windows_x64"
Metadata
Metadata
Assignees
Labels
cfe-dysfunctionalitiesIssues for the CFE not behaving as intendedIssues for the CFE not behaving as intendedlegacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)