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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/type_mask.dart

Issue 14268020: Fix issue 10216. If the type mask is a subtype, and its base mixes in class A, it should consider a… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/types/type_mask.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/type_mask.dart (revision 22106)
+++ sdk/lib/_internal/compiler/implementation/types/type_mask.dart (working copy)
@@ -435,23 +435,12 @@
|| compiler.world.hasAnySubclassThatMixes(self, other);
} else {
assert(isSubtype);
- if (other.implementsInterface(self)
+ return hasElementIn(self, selector, element)
+ || other.implementsInterface(self)
|| other.isSubclassOf(self)
|| compiler.world.hasAnySubclassThatMixes(self, other)
- || compiler.world.hasAnySubclassThatImplements(other, base)) {
- return true;
- }
-
- // If [self] is a subclass of [other], it inherits the
- // implementation of [element].
- ClassElement cls = self;
- if (cls.isSubclassOf(other)) {
- // Resolve an invocation of [element.name] on [self]. If it
- // is found, this selector is a candidate.
- return hasElementIn(cls, selector, element);
- }
+ || compiler.world.hasAnySubclassThatImplements(other, base);
}
- return false;
}
/**

Powered by Google App Engine
This is Rietveld 408576698