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

Unified Diff: pkg/compiler/lib/src/types/flat_type_mask.dart

Issue 2278143003: locateSingleElement improvement for mixins. (Closed)
Patch Set: dartfmt Created 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/world.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 59b573accb48283c7de992babaa37bdd736204e8..380c2fb1a25cfddf8642cb8c53b4f7bd193538c6 100644
--- a/pkg/compiler/lib/src/types/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/types/flat_type_mask.dart
@@ -692,8 +692,18 @@ class FlatTypeMask implements TypeMask {
// 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
// selectors.
- if (isSubtype) return null;
- if (base.isSubclassOf(enclosing)) return result;
+ ClassWorld classWorld = compiler.world;
+ if (isSubtype) {
+ // if (classWorld.isUsedAsMixin(enclosing)) {
+ if (classWorld.everySubtypeIsSubclassOfOrMixinUseOf(base, enclosing)) {
+ return result;
+ }
+ //}
+ return null;
+ } else {
+ if (base.isSubclassOf(enclosing)) return result;
+ if (classWorld.isSubclassOfMixinUseOf(base, enclosing)) return result;
+ }
return null;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698