Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
index beb5348e2875c8c23cc21129ef64476cb6a85ef3..001beae644339b3b0386a4472d44c3fc64d001ae 100644 |
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
@@ -1637,7 +1637,10 @@ class ResolverVisitor extends CommonResolverVisitor<Element> { |
this.statementScope = new StatementScope(), |
typeResolver = new TypeResolver(compiler), |
scope = element.buildScope(), |
+ // The type annotations on a typedef do not imply type checks. |
+ // TODO(karlklose): clean this up (dartbug.com/8870). |
inCheckContext = compiler.enableTypeAssertions && |
+ !element.isTypedef() && |
(element.enclosingElement == null || |
!element.enclosingElement.isTypedef()), |
inCatchBlock = false, |