Index: lib/runtime/dart_runtime.js |
diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js |
index 3e9d6baad776f3e51fff074dbb3496224f50b61f..afdc95223359c50929e8065d62ab201e2cc8a5a7 100644 |
--- a/lib/runtime/dart_runtime.js |
+++ b/lib/runtime/dart_runtime.js |
@@ -61,7 +61,7 @@ var dart, _js_helper; |
// Grab the `call` method if it's not a function. |
if (f !== null) f = f.call; |
if (!(f instanceof Function)) { |
- throwNoSuchMethod(obj, method, args); |
+ throwNoSuchMethod(obj, name, args); |
} |
} |
// TODO(jmesserly): enable this when we can fix => and methods. |
@@ -207,7 +207,15 @@ var dart, _js_helper; |
} else { |
subtypeMap.set(t1, map = new Map()); |
} |
- map.set(t2, result = isSubtype_(t1, t2)); |
+ if (t2 == core.Type) { |
+ // Special case Types. |
+ result = t1.prototype instanceof core.Type || |
Jennifer Messerly
2015/04/24 00:43:14
any reason not to include this in isSubtype_ ? I w
vsm
2015/04/24 13:25:44
Yes - the helper is recursive with t2 staying cons
|
+ t1 instanceof AbstractFunctionType || |
+ isSubtype_(t1, t2); |
+ } else { |
+ result = isSubtype_(t1, t2) |
+ } |
+ map.set(t2, result); |
return result; |
} |
dart.isSubtype = isSubtype; |