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

Unified Diff: sdk/lib/_internal/compiler/implementation/universe/universe.dart

Issue 12328035: Teach Selector.applies about mixins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/universe/universe.dart
diff --git a/sdk/lib/_internal/compiler/implementation/universe/universe.dart b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
index be9a0e506c51f4c6c800a2de8957dc5f3feefada..4fb6cfbbf7c2bfa66af96980fda3010bdc4eb82e 100644
--- a/sdk/lib/_internal/compiler/implementation/universe/universe.dart
+++ b/sdk/lib/_internal/compiler/implementation/universe/universe.dart
@@ -515,12 +515,15 @@ class TypedSelector extends Selector {
if (typeKind == TypedSelectorKind.EXACT) {
return hasElementIn(self, element) && appliesUntyped(element, compiler);
} else if (typeKind == TypedSelectorKind.SUBCLASS) {
- return (hasElementIn(self, element) || other.isSubclassOf(self))
+ return (hasElementIn(self, element)
+ || other.isSubclassOf(self)
+ || compiler.world.hasAnySubclassThatMixes(self, other))
&& appliesUntyped(element, compiler);
} else {
assert(typeKind == TypedSelectorKind.INTERFACE);
if (other.implementsInterface(self)
|| other.isSubclassOf(self)
+ || compiler.world.hasAnySubclassThatMixes(self, other)
|| compiler.world.hasAnySubclassThatImplements(other, receiverType)) {
return appliesUntyped(element, compiler);
}

Powered by Google App Engine
This is Rietveld 408576698