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

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

Issue 11315005: Fix for issue #6259: also look for subclasses when checking if a typed selector applies to an eleme… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | lib/compiler/implementation/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/universe/universe.dart
===================================================================
--- lib/compiler/implementation/universe/universe.dart (revision 14200)
+++ lib/compiler/implementation/universe/universe.dart (working copy)
@@ -407,6 +407,8 @@
}
bool applies(Element element, Compiler compiler) {
+ // [TypedSelector] are only used when compiling.
+ assert(compiler.phase == Compiler.PHASE_COMPILING);
if (!element.isMember()) return false;
// A closure can be called through any typed selector:
@@ -420,7 +422,10 @@
}
ClassElement self = receiverType.element;
- if (other.implementsInterface(self) || other.isSubclassOf(self)) {
+
+ if (other.implementsInterface(self)
+ || other.isSubclassOf(self)
+ || compiler.world.hasAnySubclassThatImplements(other, receiverType)) {
return appliesUntyped(element, compiler);
}
« no previous file with comments | « no previous file | lib/compiler/implementation/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698