Skip Menu |
Report information
Id: 125353
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: raydiak [at] cyberuniverses.com
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Sun, 7 Jun 2015 20:01:41 +0000
Subject: [BUG] %(:a:b) ignores all elements after the first one
To: rakudobug [...] perl.org
From: raydiak [...] cyberuniverses.com
Download (untitled) / with headers
text/plain 182b
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␤»
Download (untitled) / with headers
text/plain 872b
On 2015-06-07 13:01:49, raydiak@cyberuniverses.com wrote: Show quoted text
> 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.
Still reproducible (2017.11,HEAD(e5b660e))

On 2015-06-07 13:01:49, raydiak@cyberuniverses.com wrote:
Show quoted text
> 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␤»




This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org