# New Ticket Created by Moritz Lenz
# Please include the string: [perl #61094]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61094 >
While reviewing some tests in t/blocks/ I've found some bugs in rakudo's
signature parsing and sub dispatch. These tests can now be found in
t/spec/S06-signature/errors.t (which I'll add to t/spectest.data real soon).
in particular
* sub foo($.bar) { ... } should throw an error, but does not
* slurpy scalars slurp up lists:
# dies as expected:
/rakudo -e 'sub foo(*$a) { 2; }; foo(3, 4);'
too many arguments passed (2) - 1 params expected
# lives:
./rakudo -e 'sub foo(*$a) { say $a.WHAT }; foo(reverse(3, 4)); '
List
(I'm not 100% sure this is a bug, but I think it is)
* Rakudo allows magicals as parameter names, like $! and $?VERSION
Cheers,
Moritz