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 8c9c6362ae18415d8d9520170b6fca4139a68d78..5e50cbc9e313f7a667b00c3a8b638c7913e529c5 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 |
@@ -512,6 +512,19 @@ functionType(returnType, args, extra) => |
definiteFunctionType(returnType, args, extra) => |
_functionType(true, returnType, args, extra); |
+/// |
+/// TODO(vsm): Remove when mirrors is deprecated. |
+/// This is a temporary workaround to support dart:mirrors, which doesn't |
+/// understand generic methods. |
+/// |
+getFunctionTypeMirror(AbstractFunctionType type) { |
+ if (type is GenericFunctionType) { |
+ var typeArgs = new List.filled(type.formalCount, dynamic); |
+ return type.instantiate(typeArgs); |
+ } |
+ return type; |
+} |
+ |
bool isType(obj) => JS( |
'', |
'''(() => { |