# New Ticket Created by  Tadeusz SoĊ›nierz 
# Please include the string:  [perl #127977]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127977 >


$ 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.

Reply via email to