Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
index 6b83cda776b8c356337cd743c3baa964dedede71..d947b91e37b65186375006bf96ad2f65c23e9ff2 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart |
@@ -594,6 +594,11 @@ class SsaInstructionSimplifier extends HBaseVisitor |
HInstruction value = node.inputs[0]; |
DartType type = node.typeExpression; |
if (type != null) { |
+ if (type.kind == TypeKind.MALFORMED_TYPE) { |
+ // Malformed types are treated as dynamic statically, but should |
+ // throw a type error at runtime. |
+ return node; |
+ } |
if (!type.treatAsRaw || type.kind == TypeKind.TYPE_VARIABLE) { |
return node; |
} |