| Index: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| index 290385f39c36313e745f62de91c45ccabb0328f4..8661351493ba881c7d1eda3bf7ae7e68a0426ff9 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
|
| @@ -133,7 +133,12 @@ class JSInvocationMirror implements Invocation {
|
| arguments = [object]..addAll(arguments);
|
| receiver = interceptor;
|
| }
|
| - return JS("var", "#[#].apply(#, #)", receiver, name, receiver, arguments);
|
| + var method = JS('var', '#[#]', receiver, name);
|
| + if (JS('String', 'typeof #', method) == 'function') {
|
| + return JS("var", "#.apply(#, #)", method, receiver, arguments);
|
| + } else {
|
| + return receiver.noSuchMethod(this);
|
| + }
|
| }
|
|
|
| /// This method is called by [InstanceMirror.delegate].
|
|
|