Index: sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
=================================================================== |
--- sdk/lib/_internal/compiler/implementation/elements/modelx.dart (revision 18125) |
+++ sdk/lib/_internal/compiler/implementation/elements/modelx.dart (working copy) |
@@ -1700,7 +1700,10 @@ |
* account. |
*/ |
bool isSubclassOf(ClassElement cls) { |
- for (ClassElement s = this; s != null; s = s.superclass) { |
+ // Use [declaration] for both [this] and [cls], because |
+ // declaration classes hold the superclass hierarchy. |
+ cls = cls.declaration; |
+ for (ClassElement s = declaration; s != null; s = s.superclass) { |
if (identical(s, cls)) return true; |
} |
return false; |