@@ -85,6 +85,7 @@ throwNoSuchMethodFunc(obj, name, pArgs, opt_func) => JS('', '''(() => {
85
85
})()''' );
86
86
87
87
checkAndCall (f, ftype, obj, args, name) => JS ('' , '''(() => {
88
+ let originalFunction = $f ;
88
89
if (!($f instanceof Function)) {
89
90
// We're not a function (and hence not a method either)
90
91
// Grab the `call` method if it's not a function.
@@ -93,7 +94,7 @@ checkAndCall(f, ftype, obj, args, name) => JS('', '''(() => {
93
94
$f = $f .call;
94
95
}
95
96
if (!($f instanceof Function)) {
96
- $throwNoSuchMethodFunc ($obj , $name , $args );
97
+ $throwNoSuchMethodFunc ($obj , $name , $args , originalFunction );
97
98
}
98
99
}
99
100
// If f is a function, but not a method (no method type)
@@ -115,7 +116,7 @@ checkAndCall(f, ftype, obj, args, name) => JS('', '''(() => {
115
116
116
117
// TODO(leafp): throw a type error (rather than NSM)
117
118
// if the arity matches but the types are wrong.
118
- $throwNoSuchMethodFunc ($obj , $name , $args , $ f );
119
+ $throwNoSuchMethodFunc ($obj , $name , $args , originalFunction );
119
120
})()''' );
120
121
121
122
dcall (f, @rest args) => JS ('' , '''(() => {
0 commit comments