Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dart2wasm] Handle switches with just a default case
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 <[email protected]> Reviewed-by: Joshua Litt <[email protected]>
- Loading branch information