Skip to content

Commit

Permalink
Modify Parameter's positional to rm slurpies
Browse files Browse the repository at this point in the history
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 93a8ec6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Parameter.pm6
Expand Up @@ -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
Expand Down

0 comments on commit 93a8ec6

Please sign in to comment.