| Index: pkg/compiler/lib/src/js/rewrite_async.dart
|
| diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
|
| index c2863c5d895c9e32fc00dcc6819e9818b200cf4d..65408295e6f8bb56e49fc736df550a4b5c8143f6 100644
|
| --- a/pkg/compiler/lib/src/js/rewrite_async.dart
|
| +++ b/pkg/compiler/lib/src/js/rewrite_async.dart
|
| @@ -2412,7 +2412,10 @@ class PreTranslationAnalysis extends js.NodeVisitor<bool> {
|
| @override
|
| bool visitSwitch(js.Switch node) {
|
| loopsAndSwitches.add(node);
|
| - bool result = visit(node.key);
|
| + // If the key has an `await` expression, do not transform the
|
| + // body of the switch.
|
| + visit(node.key);
|
| + bool result = false;
|
| for (js.SwitchClause clause in node.cases) {
|
| if (visit(clause)) result = true;
|
| }
|
|
|