mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:35:05 +00:00
478f2bb34c
Currently switch compiler looks at literals in alternatives to determine how to check for equality. When a switch statement only has a default case (no literals) the code fails to determine the type of the expression in case statement and assumes `bool`. Fixed by checking for these cases. These tests now pass: - co19/Language/Statements/Switch/syntax_t01 - co19/Language/Statements/Switch/execution_t02 - language/nnbd/flow_analysis/write_promoted_value_in_switch_test Change-Id: If277b5a2dd04dd84d8d4ab6227d95c049d71f0e5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264681 Commit-Queue: Ömer Ağacan <omersa@google.com> Reviewed-by: Joshua Litt <joshualitt@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
analysis_options.yaml | ||
dart2wasm.md | ||
OWNERS | ||
pubspec.yaml |