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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart

Issue 184173004: Implement isSubclassOf for dart2js source mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
index 3dffd960bf47244846f4eae6838df35940ca03f7..af91ba4d6bec054e981eead09699795392895643 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_type_mirrors.dart
@@ -193,6 +193,14 @@ class Dart2JsInterfaceTypeMirror
return null;
}
+ bool isSubclassOf(Mirror other) {
+ if (other is Dart2JsTypeMirror) {
+ return _element.isSubclassOf(other._type.element);
+ } else {
+ throw new ArgumentError(other);
+ }
+ }
+
ClassMirror get mixin {
if (_element.isMixinApplication) {
MixinApplicationElement mixinApplication = _element;
@@ -407,6 +415,8 @@ class Dart2JsFunctionTypeMirror extends Dart2JsTypeMirror
}
String toString() => 'Mirror on function type $_type';
+
+ bool isSubclassOf(ClassMirror other) => false;
}
class Dart2JsVoidMirror extends Dart2JsTypeMirror {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698