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

Unified Diff: pkg/compiler/lib/src/types/flat_type_mask.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/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/function_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/flat_type_mask.dart
diff --git a/pkg/compiler/lib/src/types/flat_type_mask.dart b/pkg/compiler/lib/src/types/flat_type_mask.dart
index 15caf644d2bd4059f60c6bf41211d67111bf0a0c..1ec355acf719307c2612fe23d8dd26569a19c193 100644
--- a/pkg/compiler/lib/src/types/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/types/flat_type_mask.dart
@@ -522,7 +522,7 @@ class FlatTypeMask implements TypeMask {
backendClasses.nullImplementation, selector, element);
}
- ClassEntity other = element.enclosingClass.declaration;
+ ClassEntity other = element.enclosingClass;
if (other == backendClasses.nullImplementation) {
return isNullable;
} else if (isExact) {
@@ -573,7 +573,7 @@ class FlatTypeMask implements TypeMask {
closedWorld.allFunctions.filter(selector, this);
if (targets.length != 1) return null;
Element result = targets.first;
- ClassElement enclosing = result.enclosingClass.declaration;
+ ClassElement enclosing = result.enclosingClass;
// We only return the found element if it is guaranteed to be implemented on
// all classes in the receiver type [this]. It could be found only in a
// subclass or in an inheritance-wise unrelated class in case of subtype
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/function_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698