In any-str.pir we need to figure out how to change

.sub 'split' :method :multi('String')

into

.sub 'split' :method :multi(_, 'String')

since the former method signature is causing problems for me as I'm
trying to implement

.sub 'split' :method :multi(_, 'Sub')

with an additional optional argument (the limit of how many elements
to return in the list). While we still have the ".sub 'split' :method
:multi('String')" method and I try to run some Perl 6 code that uses
the newly added optional parameter to ".sub 'split' :method :multi(_,
'Sub')", I get the following error:

say "theXbiggestXbangXforXtheXbuck".split(/X/, 3).perl;
too many arguments passed (3) - 2 params expected
current instr.: 'parrot;Any;split' pc 10833 (src/gen_builtins.pir:6926)

Line 6926 of gen_builtins.pir is ".sub 'split' :method
:multi('String')", not the expected method ".sub 'split' :method
:multi(_, 'Sub')". Any when we change .sub 'split' :method
:multi('String')" to "
.sub 'split' :method :multi(_, 'String')" I can't even compile Perl 6.
I get the following error:

No applicable methods.

current instr.: 'parrot;Perl6;Grammar;Actions;dec_number' pc 129924
(src/gen_actions.pir:11299)

>From this point I'm not sure what's going on.... any help would be
greatly appreciated.

Best Regards,
-Chris

Reply via email to