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

Unified Diff: pkg/compiler/lib/src/elements/modelx.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 | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 4d5c79d551e6a1944692724c4979e6b399a108b7..6ff57cc0812853b7b839771819081f406764dea4 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -163,7 +163,7 @@ abstract class ElementX extends Element with ElementCommon {
ClassElement get enclosingClass {
for (Element e = this; e != null; e = e.enclosingElement) {
- if (e.isClass) return e;
+ if (e.isClass) return e.declaration;
}
return null;
}
@@ -2357,7 +2357,7 @@ abstract class ConstructorElementX extends FunctionElementX
ConstructorElement get definingConstructor => null;
- ClassElement get enclosingClass => enclosingElement;
+ ClassElement get enclosingClass => enclosingElement.declaration;
}
class DeferredLoaderGetterElementX extends GetterElementX
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/inferrer_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698