-
Notifications
You must be signed in to change notification settings - Fork 29
Fixes #2945. Fix invalid_null_aware_operator in null-aware elements tests #2946
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
Conversation
eernstg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I noticed one typo, and then I'm questioning a bunch of errors around ?++i and such (I can't see why we should get an error in those cases)
LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_A05_t02.dart
Outdated
Show resolved
Hide resolved
LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_unary_prefix_A01_t01.dart
Outdated
Show resolved
Hide resolved
sgrekhov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. PTAL.
LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_A05_t02.dart
Outdated
Show resolved
Hide resolved
LanguageFeatures/Control-flow-collections/Null-aware-elements/syntax_unary_prefix_A01_t01.dart
Outdated
Show resolved
Hide resolved
eernstg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
2024-10-29 sgrekhov22@gmail.com Fixes dart-lang/co19#2954. Don't expect null-aware warnings in CFE (dart-lang/co19#2955) 2024-10-28 sgrekhov22@gmail.com Fixes dart-lang/co19#2947. Expect AUGMENTATION_OF_DIFFERENT_DECLARATION_KIND in augmenting_types_A02_t14_lib.dart (dart-lang/co19#2952) 2024-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2933. Add one more Stream.multi test (dart-lang/co19#2948) 2024-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2950. Fix run-time errors in null-aware elements tests (dart-lang/co19#2951) 2024-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2386. Add more super-bounded types tests (dart-lang/co19#2949) 2024-10-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2945. Fix invalid_null_aware_operator in null-aware elements tests (dart-lang/co19#2946) 2024-10-25 sgrekhov22@gmail.com dart-lang/co19#2933. Add MultiStreamController tests. Part 4. (dart-lang/co19#2941) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: I77f4faaa3ad785c9c43bf47807fcf9b355edaa5e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392906 Commit-Queue: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
It can be argued but I choose the following approach for fixing this issue:
syntax_A05_t02.dartandsyntax_A05_t04.darttesting that parser can distingish null-aware element and if-null and null-aware expressions. So, simply ignore these warnings.syntax_parenthesized_A01_t01.darttypo fixedsyntax_unary_prefix_A01_t01.dartit's syntax test again. But let's have two versions of the test here. One static and one run-time (which ignores the warnings). It'll check that warnings are really reported.type_inference_map_A06_t01.dartit's a type inference test. Expect a warning, no need the run-time version of the test.Please review.