Index: sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart |
index 358d74eec09e73cce214b49695cb804596e2b1e6..361d2f25c665903ed0ec0909c912ea31bdec8ca6 100644 |
--- a/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart |
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/concrete_types_inferrer.dart |
@@ -434,8 +434,6 @@ class ConcreteTypeSystem extends TypeSystem<ConcreteType> { |
return new TypeMask.nonNullSubclass(compiler.backend.numImplementation); |
} else if (element == compiler.backend.intImplementation) { |
return new TypeMask.nonNullSubclass(compiler.backend.intImplementation); |
- } else if (element == compiler.dynamicClass) { |
- return new TypeMask.nonNullSubclass(compiler.objectClass); |
} else { |
return new TypeMask.nonNullExact(element.declaration); |
} |
@@ -495,14 +493,13 @@ class ConcreteTypeSystem extends TypeSystem<ConcreteType> { |
if (annotation.isVoid) return nullType; |
if (annotation.element == compiler.objectClass) return type; |
ConcreteType otherType; |
- if (annotation.kind == TypeKind.TYPEDEF |
- || annotation.kind == TypeKind.FUNCTION) { |
+ if (annotation.isTypedef || annotation.isFunctionType) { |
otherType = functionType; |
- } else if (annotation.kind == TypeKind.TYPE_VARIABLE) { |
+ } else if (annotation.isTypeVariable) { |
// TODO(polux): Narrow to bound. |
return type; |
} else { |
- assert(annotation.kind == TypeKind.INTERFACE); |
+ assert(annotation.isInterfaceType); |
otherType = nonNullSubtype(annotation.element); |
} |
if (isNullable) otherType = otherType.union(nullType); |
@@ -1799,7 +1796,7 @@ class ConcreteTypesInferrer |
// We trust the return type of native elements |
if (isNativeElement(element)) { |
var elementType = element.type; |
- assert(elementType.kind == TypeKind.FUNCTION); |
+ assert(elementType.isFunctionType); |
return typeOfNativeBehavior( |
native.NativeBehavior.ofMethod(element, compiler)); |
} |