Index: pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart |
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart |
index 4719b6ac117b3121f21f1f220230dbcb8a6ad5fa..e68c4886f93e76539efde5f24589ca176bd7790c 100644 |
--- a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart |
+++ b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart |
@@ -247,7 +247,9 @@ class BodyRewriter extends ExpressionVisitor<Expression> { |
} |
Expression visitTypeOperator(TypeOperator node) { |
- node.receiver = visitExpression(node.receiver); |
+ node.value = visitExpression(node.value); |
+ if (seenImpure) return node; |
+ rewriteList(node.typeArguments); |
if (!node.isTypeTest) seenImpure = true; // Type cast can throw. |
return node; |
} |