Index: sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart b/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart |
index 865c1986e34b60bedf9c80d5ca90b2c89d412a80..f18d60c9d95c0035a66259ef8622c68e207da5db 100644 |
--- a/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart |
+++ b/sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart |
@@ -8,8 +8,7 @@ TypeMask narrowType(TypeMask type, |
DartType annotation, |
Compiler compiler, |
{bool isNullable: true}) { |
- if (annotation.isDynamic) return type; |
- if (annotation.isMalformed) return type; |
+ if (annotation.treatAsDynamic) return type; |
if (annotation.isVoid) return compiler.typesTask.nullType; |
if (annotation.element == compiler.objectClass) return type; |
TypeMask otherType; |
@@ -598,7 +597,7 @@ abstract class InferrerVisitor extends ResolvedVisitor<TypeMask> { |
Node exception = node.exception; |
if (exception != null) { |
DartType type = elements.getType(node.type); |
- TypeMask mask = type == null |
+ TypeMask mask = type == null || type.treatAsDynamic |
? inferrer.dynamicType |
: new TypeMask.nonNullSubtype(type.asRaw()); |
locals.update(elements[exception], mask); |