Index: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
index be461359bf206dd3b11f56ba11ecf106d779be47..38e9e4fd72e9471b5649985f29076ce6e3c9da8d 100644 |
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart |
@@ -1116,12 +1116,13 @@ abstract class HInstruction implements Spannable { |
// instructions with generics. It has the generic type context |
// available. |
assert(type.kind != TypeKind.TYPE_VARIABLE); |
- assert(type.isRaw |
- || type.isMalformed |
- || type.kind == TypeKind.FUNCTION); |
- if (identical(type.element, compiler.dynamicClass)) return this; |
+ assert(type.isRaw || type.kind == TypeKind.FUNCTION); |
+ if (type.containsAmbiguousTypes) { |
+ return new HTypeConversion(type, kind, HType.UNKNOWN, this); |
+ } |
+ if (type.treatAsDynamic) return this; |
if (identical(type.element, compiler.objectClass)) return this; |
- if (type.isMalformed || type.kind != TypeKind.INTERFACE) { |
+ if (type.kind != TypeKind.INTERFACE) { |
return new HTypeConversion(type, kind, HType.UNKNOWN, this); |
} else if (kind == HTypeConversion.BOOLEAN_CONVERSION_CHECK) { |
// Boolean conversion checks work on non-nullable booleans. |