You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following tests fails in both CFE and Analyzer
// SharedOptions=--enable-experiment=inline-classextension typeET(int? _id) {
voidtest() {
if (_id isint) {
_id.isOdd; // Analyzer COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE// CFE Error: Property 'isOdd' cannot be accessed on 'int?' because it is potentially null.
}
}
}
main() {
ET et =ET(1);
et.test();
if (et._id !=null) {
et._id.isEven; // Analyzer COMPILE_TIME_ERROR.UNCHECKED_USE_OF_NULLABLE_VALUE// CFE Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
}
}
Right, the representation variable of an extension type should be promotable (private or not).
[Edit: The rules were changed after I wrote this: An extension type representation variable is only promotable if it is private. However, it is then unconditionally promotable, and it doesn't matter that other declarations in the same library have the same name.]
Thanks for the report! Since this concerns an unreleased feature (extension types) I'll plan to look at it after all other field pormotion work is complete.
The following tests fails in both CFE and Analyzer
cc @stereotype441 @eernstg
Tested on the exdge SDK (Sept 6, 2023) on Linux x64
The text was updated successfully, but these errors were encountered: