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

Unified Diff: lib/compiler/implementation/typechecker.dart

Issue 10834243: Reduce usage of .enclosingElement to get enclosing class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
Index: lib/compiler/implementation/typechecker.dart
diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
index fbf0cece90c33e08aaf529e95ae8eaeff874b575..9344d233a888ae4952a10597793b9728a97218d7 100644
--- a/lib/compiler/implementation/typechecker.dart
+++ b/lib/compiler/implementation/typechecker.dart
@@ -339,7 +339,7 @@ class TypeCheckerVisitor implements Visitor<Type> {
}
Type previous = expectedReturnType;
expectedReturnType = returnType;
- if (element.isMember()) currentClass = element.enclosingElement;
+ if (element.isMember()) currentClass = element.getEnclosingClass();
StatementType bodyType = analyze(node.body);
if (returnType != types.voidType && returnType != types.dynamicType
&& bodyType != StatementType.RETURNING) {

Powered by Google App Engine
This is Rietveld 408576698