https://github.com/rakudo/rakudo/tree/rt-127977 contains a fix for that
On 24/04/16 12:28, perl6 via RT wrote:
Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "[BUG] Constraint on a slurpy MAIN parameter leaks out internal exceptions", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [perl #127977]. Please include the string: [perl #127977] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, perl6-bugs-follo...@perl.org ------------------------------------------------------------------------- $ cat test.pl sub MAIN(@args where sub { False }) { say ":)" } $ perl6 test.pl Usage: test.pl <args> $ cat test.pl # note the slurpy sub MAIN(*@args where sub { False }) { say ":)" } $ perl6 test.pl Constraint type check failed for parameter '@args' in sub MAIN at test.pl line 1 in block <unit> at test.pl line 1 -------------------------------------------------- I expect USAGE in both cases, since it's both exactly invalid use of MAIN. Patch and spectest incoming.