-
Notifications
You must be signed in to change notification settings - Fork 28
#3057. Add switch-expression tests #3135
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
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, with a couple of typos.
One issue should be considered, though: We don't have a specification of switch expressions, but (worse) we also don't have a specification of the flow analysis of pattern matching (which would make a huge difference for switch expression as well as switch statements).
I think we might well have covered much of this based on the ordering considerations that were part of the discussions about pattern tests, but there could still be some lack of coverage. I created an issue (mentioned in a comment).
So I think we can land this PR when the typos have been fixed, but then we probably need to think about further testing of similar constructs (involving pattern matching and/or other recent features).
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A02_t03.dart
Outdated
Show resolved
Hide resolved
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.
Thank you. Updated. PTAL.
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A02_t03.dart
Outdated
Show resolved
Hide resolved
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
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A01_t01.dart
Outdated
Show resolved
Hide resolved
TypeSystem/flow-analysis/reachability_switch_expression_A02_t03.dart
Outdated
Show resolved
Hide resolved
2025-04-10 [email protected] dart-lang/co19#3057. Add more flow analysis tests for while loop (dart-lang/co19#3141) 2025-04-10 [email protected] dart-lang/co19#2119. Rename unary_minus.dart to be visible for the test runner (dart-lang/co19#3140) 2025-04-09 [email protected] dart-lang/co19#3057. Add flow analysis try-finally tests (dart-lang/co19#3139) 2025-04-08 [email protected] Fixes dart-lang/co19#3136. Update expected errors location in initializer_not_a_constant_t03.dart (dart-lang/co19#3138) 2025-04-08 [email protected] dart-lang/co19#3057. Add flow analysis try-catch tests (dart-lang/co19#3137) 2025-04-08 [email protected] dart-lang/co19#3057. Add switch-expression tests (dart-lang/co19#3135) 2025-04-07 [email protected] Fixes dart-lang/co19#3133. Fix language version format. (dart-lang/co19#3134) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: Ibef7bb6dbc070122711ade17173946466f468a7e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422060 Reviewed-by: Chloe Stefantsova <[email protected]> Reviewed-by: Alexander Thomas <[email protected]> Commit-Queue: Chloe Stefantsova <[email protected]> Auto-Submit: Sergey Grekhov <[email protected]>
No description provided.