Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12387039: Check if the element is a typedef (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add TODO with issue reference. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698