Chromium Code Reviews| Index: runtime/lib/errors_patch.dart |
| diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart |
| index cf42b572f7c9a7904b0c590174835b36af7ade8b..fa43b102dacf0c70f744b67091bbba87aeacb8a7 100644 |
| --- a/runtime/lib/errors_patch.dart |
| +++ b/runtime/lib/errors_patch.dart |
| @@ -312,7 +312,9 @@ class NoSuchMethodError { |
| .writeln("The $type_str '$memberName' was called on null."); |
| } |
| } else { |
| - if (_receiver is Function) { |
| + if (_receiver.runtimeType == Function || |
| + _receiver.runtimeType == _Closure || |
| + (_receiver is Function && memberName.startsWith("call"))) { |
|
Florian Schneider
2017/03/30 20:18:05
I think this should be
(_receiver is Function &&
|
| msg_buf.writeln("Closure call with mismatched arguments: " |
| "function '$memberName'"); |
| } else if (_receiver is _Type && memberName == "call") { |