Skip to content
Permalink
Browse files

Modify Parameter's positional to rm slurpies

Add slurpy_lol (**@) and slurpy_onearg (+@) to param types that are not
considered positional.

This caused an issue when using '.assuming'. The fact that they were
considered both positional and slurpy caused them
to be added multiple times to a new param list and miscompiled on EVAL
(The below example would result in a redeclaration error).

    sub x(+@A, :$b) { say "{@a.perl} and $b" }; &x.assuming(:!b);

See [GH Issue 1918](#1918).
  • Loading branch information...
jstuder-gh committed Jun 13, 2018
1 parent f2b5037 commit 93a8ec66553b78405052b71fa793f062e073b109
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/Parameter.pm6
@@ -36,6 +36,8 @@ my class Parameter { # declared in BOOTSTRAP

my constant $SIG_ELEM_IS_NOT_POSITIONAL = $SIG_ELEM_SLURPY_POS
+| $SIG_ELEM_SLURPY_NAMED
+| $SIG_ELEM_SLURPY_LOL
+| $SIG_ELEM_SLURPY_ONEARG
+| $SIG_ELEM_IS_CAPTURE;
my constant $SIG_ELEM_IS_SLURPY = $SIG_ELEM_SLURPY_POS
+| $SIG_ELEM_SLURPY_NAMED

0 comments on commit 93a8ec6

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