Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart |
index e64daf7484bd035645af85ecc71bb9ccf3341383..d1000c78c7d59ff1e25a7e2848fb2cd4300a1dbf 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/types.dart |
@@ -513,6 +513,12 @@ functionType(returnType, args, extra) => |
definiteFunctionType(returnType, args, extra) => |
_functionType(true, returnType, args, extra); |
+bool isType(obj) => JS( |
+ '', |
+ '''(() => { |
+ return $_getRuntimeType($obj) === $Type; |
+ })()'''); |
+ |
String typeName(type) => JS( |
'', |
'''(() => { |
@@ -698,8 +704,8 @@ _isTop(type) { |
if (JS('bool', '# === #', getGenericClass(type), getGenericClass(FutureOr))) { |
return _isTop(JS('', '#[0]', getGenericArgs(type))); |
} |
- return JS('bool', '# == # || # == # || # == #', |
- type, Object, type, dynamic, type, _void); |
+ return JS('bool', '# == # || # == # || # == #', type, Object, type, dynamic, |
+ type, _void); |
} |
_isSubtype(t1, t2, isCovariant) => JS( |