Chromium Code Reviews| Index: lib/compiler/implementation/elements/elements.dart |
| =================================================================== |
| --- lib/compiler/implementation/elements/elements.dart (revision 6835) |
| +++ lib/compiler/implementation/elements/elements.dart (working copy) |
| @@ -846,6 +846,19 @@ |
| return false; |
| } |
| + /** |
| + * Returns true if [cls] is a subclass of [this]. |
|
kasperl
2012/04/23 12:34:45
Shouldn't this be: if [this] is a subclass of [cls
ahe
2012/04/23 12:37:53
Good catch.
ngeoffray
2012/04/23 13:48:18
Done.
|
| + * |
| + * This method is not to be used for checking type hierarchy and |
|
floitsch
2012/04/23 13:58:30
Add explanation why, or contrast to it ("whereas a
ngeoffray
2012/04/23 14:09:33
Done.
|
| + * assignments. |
| + */ |
| + bool isSubclassOf(ClassElement cls) { |
| + for (ClassElement s = superclass; s != null; s = s.superclass) { |
|
kasperl
2012/04/23 12:34:45
It is a bit surprising that you don't start at [th
ahe
2012/04/23 12:37:53
Good catch.
I think this is a copy-and-paste erro
ngeoffray
2012/04/23 13:48:18
The method should start at this. Code fixed.
|
| + if (s === cls) return true; |
| + } |
| + return false; |
| + } |
| + |
| bool isInterface() => false; |
| bool isNative() => nativeName != null; |
| SourceString nativeName; |