Index: sdk/lib/_internal/compiler/implementation/types/type_mask.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart |
index ffc8d906782f1c2024aa7d9c95ff85eb20d83048..828be8744b9c563b9ce50f852df71818b493a84e 100644 |
--- a/sdk/lib/_internal/compiler/implementation/types/type_mask.dart |
+++ b/sdk/lib/_internal/compiler/implementation/types/type_mask.dart |
@@ -59,9 +59,11 @@ class TypeMask { |
* Returns whether or not this type mask contains the given type. |
*/ |
bool contains(DartType type, Compiler compiler) { |
- // TODO(kasperl): Get rid of this handling. |
+ // TODO(kasperl): Do this error handling earlier. |
if (base.isMalformed) return isSubtype; |
- assert(!type.isMalformed); |
+ if (base.kind != TypeKind.INTERFACE) return false; |
+ assert(type.kind == TypeKind.INTERFACE); |
+ // Compare the interface types. |
ClassElement baseElement = base.element; |
ClassElement typeElement = type.element; |
if (isExact) { |