Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture.perl mishandles Pairs as positional args #5586

Open
p6rt opened this issue Aug 17, 2016 · 1 comment
Open

Capture.perl mishandles Pairs as positional args #5586

p6rt opened this issue Aug 17, 2016 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Aug 17, 2016

Migrated from rt.perl.org#128976 (status was 'new')

Searchable as RT128976$

@p6rt
Copy link
Author

p6rt commented Aug 17, 2016

From zefram@fysh.org

Using .WHICH as a handy means of introspection​:

\(​:a).WHICH
Capture|a(Bool|1)
\((​:a)).WHICH
Capture|(Pair|Str|a|Bool|1)
\(​:a).perl
\(​:a)
\((​:a)).perl
\(​:a)
\(​:a).perl.EVAL.WHICH
Capture|a(Bool|1)
\((​:a)).perl.EVAL.WHICH
Capture|a(Bool|1)

On the Capture that has a constant Pair as a positional argument, .perl
emits code that presents the Pair literal as a named argument. I'd expect
.perl to ensure correct round-tripping by using extra parens (as I did
on input) or some equivalent circumlocution to force interpretation as
a positional argument.

-zefram

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant