On Mon, 24 Jul 2017 07:15:54 -0700, [email protected] wrote:
> It would be more awesome if "Unexected named argument 'foo' passed" was
> supplemented with the name of the function to which it was passed.
>
> sub xyzzy ($x, :$foo = False) { ... }
> sub bar ($y) { ... }
>
> xyzzy(
> bar "aoeusnthaoeusnth",
> :foo
> )
>
> If the error message includes the name 'bar', it's obvious that adding
> parentheses will fix the problem.
But the error for that code does already say `in sub bar`:
m: sub bar {}; bar :42foo
rakudo-moar 2fb8c7: OUTPUT: «Unexpected named argument 'foo' passed in
sub bar at <tmp> line 1