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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart

Issue 2619243002: Make .enclosingClass always return the declaration (Closed)
Patch Set: Updated cf. comments Created 3 years, 11 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 | « pkg/compiler/lib/src/inferrer/inferrer_engine.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index 476b0fcd4ade2b206d1e82af436e80f09c03052d..644a9a554eb0cdbbb52a6ba9eddb290f9b3a2f3b 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -1171,8 +1171,8 @@ class SimpleTypeInferrerVisitor extends ast.Visitor<TypeInformation>
bool isThisOrSuper(ast.Node node) => node.isThis() || node.isSuper();
bool isInClassOrSubclass(Element element) {
- ClassElement cls = outermostElement.enclosingClass.declaration;
- ClassElement enclosing = element.enclosingClass.declaration;
+ ClassElement cls = outermostElement.enclosingClass;
+ ClassElement enclosing = element.enclosingClass;
return closedWorld.isSubclassOf(enclosing, cls);
}
@@ -2028,7 +2028,7 @@ class SimpleTypeInferrerVisitor extends ast.Visitor<TypeInformation>
TypeMask mask, ArgumentsTypes arguments) {
// Ensure we create a node, to make explicit the call to the
// `noSuchMethod` handler.
- ClassElement cls = outermostElement.enclosingClass.declaration;
+ ClassElement cls = outermostElement.enclosingClass;
MethodElement element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
if (!Selectors.noSuchMethod_.signatureApplies(element)) {
element = compiler.commonElements.objectClass
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_engine.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698