-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
The analyzer rejects the following code, but the CFE accepts it:
extension type E(int? value) {}
test<T extends E>(T t) => t.value; // ERRORThe analyzer's error message is: The property 'value' can't be unconditionally accessed because the receiver can be 'null'. It's true that the receiver (t) can be null (because the extension type's representation type is nullable), but that's not a problem; it's still safe to access the property value.
FMorschel
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)