Skip to content
Browse files

Allow capture argument to MAIN to accept arguments

Previously RUN-MAIN would erroneously reject a sub MAIN(|capture), with
this patch it will accept this. This is probably not useful for real
programs, but it useful in debugging the arguments parser.
  • Loading branch information...
Leont committed May 22, 2019
1 parent 672fd6e commit 410ff5643d12c4e69548d53607a6c7edb0563dd7
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/core/Main.pm6
@@ -266,6 +266,7 @@ my sub RUN-MAIN(&main, $mainline, :$in-as-argsfiles) {

sub has-unexpected-named-arguments($signature, %named-arguments) {
return False if $signature.params.first: *.capture;
my @named-params = $signature.params.grep: *.named;
return False if @named-params.first: *.slurpy;

0 comments on commit 410ff56

Please sign in to comment.
You can’t perform that action at this time.