Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
index 69281b050e70a008d938238b3818fbf5cadd69f0..c7b57180345c52a334056562f02a5b89a16c61ca 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/classes.dart |
@@ -237,6 +237,14 @@ getSetterType(type, name) { |
if (type != null) { |
// TODO(jmesserly): it would be nice not to encode setters with a full |
// function type. |
+ if (JS('bool', '# instanceof Array', type)) { |
+ // The type has metadata attached. Pull out just the type. |
+ // TODO(vsm): Come up with a more robust encoding for this or remove |
+ // if we can deprecate mirrors. |
+ // Essentially, we've got a FunctionType or a |
+ // [FunctionType, metadata1, ..., metadataN]. |
+ type = JS('', '#[0]', type); |
+ } |
return JS('', '#.args[0]', type); |
} |
} |