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

%(:a:b) ignores all elements after the first one #4308

Open
p6rt opened this issue Jun 7, 2015 · 4 comments
Open

%(:a:b) ignores all elements after the first one #4308

p6rt opened this issue Jun 7, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jun 7, 2015

Migrated from rt.perl.org#125353 (status was 'open')

Searchable as RT125353$

@p6rt
Copy link
Author

p6rt commented Jun 7, 2015

From @raydiak

19​:52​:25 raydiak | m​: say (​:a(1)​:b(2)).hash; say %(​:a(1)​:b(2)); say %(​:a(1),​:b(2))
19​:52​:26 +camelia | rakudo-moar 442a56​: OUTPUT«a => 1, b => 2␤a => 1␤a => 1, b => 2␤»

@p6rt
Copy link
Author

p6rt commented Jun 22, 2015

From @hoelzro

On 2015-06-07 13​:01​:49, raydiak@​cyberuniverses.com wrote​:

19​:52​:25 raydiak | m​: say (​:a(1)​:b(2)).hash; say %(​:a(1)​:b(2)); say
%(​:a(1),​:b(2))
19​:52​:26 +camelia | rakudo-moar 442a56​: OUTPUT«a => 1, b => 2␤a =>
1␤a => 1, b => 2␤»

I believe the reason behind this is that contextualizers (such as %(...)) are not parsed with the normal () rule, and not handled by the circumfix​:sym<( )> action method. They have their own parsing logic here​:

https://github.com/rakudo/rakudo/blob/164f1e070154bbb80a27d312be15de948fc8db81/src/Perl6/Grammar.nqp#L1917

...and the corresponding action method (found at https://github.com/rakudo/rakudo/blob/a927a5a2c7570cc2c78ea69e8b0eff3b26cf48a5/src/Perl6/Actions.nqp#L1777) does not invoke &infix​:<,> like https://github.com/rakudo/rakudo/blob/a927a5a2c7570cc2c78ea69e8b0eff3b26cf48a5/src/Perl6/Actions.nqp#L4968 does.

@p6rt
Copy link
Author

p6rt commented Jun 22, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @AlexDaniel

Still reproducible (2017.11,HEAD(e5b660e))

On 2015-06-07 13​:01​:49, raydiak@​cyberuniverses.com wrote​:

19​:52​:25 raydiak | m​: say (​:a(1)​:b(2)).hash; say %(​:a(1)​:b(2)); say
%(​:a(1),​:b(2))
19​:52​:26 +camelia | rakudo-moar 442a56​: OUTPUT«a => 1, b => 2␤a =>
1␤a => 1, b => 2␤»

@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