Index: sdk/lib/_internal/compiler/implementation/typechecker.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart |
index d4889b665be47ea93784441fcdebf05d88d6cb66..7ae237e9e0907970fe0e007132e4e83c035df9ea 100644 |
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart |
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart |
@@ -36,6 +36,7 @@ class TypeKind { |
static const TypeKind STATEMENT = const TypeKind('statement'); |
static const TypeKind TYPEDEF = const TypeKind('typedef'); |
static const TypeKind TYPE_VARIABLE = const TypeKind('type variable'); |
+ static const TypeKind MALFORMED_TYPE = const TypeKind('malformed'); |
static const TypeKind VOID = const TypeKind('void'); |
String toString() => id; |
@@ -150,6 +151,24 @@ class VoidType extends DartType { |
String toString() => name.slowToString(); |
} |
+class MalformedType extends DartType { |
+ const MalformedType(this.element); |
+ |
+ TypeKind get kind => TypeKind.MALFORMED_TYPE; |
+ |
+ SourceString get name => element.name; |
+ |
+ final MalformedTypeElement element; |
+ |
+ DartType unalias(Compiler compiler) => this; |
+ |
+ int get hashCode => 1733; |
+ |
+ bool operator ==(other) => other is MalformedType; |
+ |
+ String toString() => name.slowToString(); |
+} |
+ |
class InterfaceType extends DartType { |
final Element element; |
final Link<DartType> arguments; |
@@ -319,6 +338,8 @@ class Types { |
if (t is VoidType) { |
return false; |
+ } else if (t is MalformedType) { |
+ return false; |
} else if (t is InterfaceType) { |
if (s is !InterfaceType) return false; |
ClassElement tc = t.element; |