Skip Menu |
Report information
Id: 131341
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

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



Subject: Cannot array-index after using «» (or << >>) indexing
This errors out: <Zoffix__> m: my $n = 'foo'; my $m = :42foo; say $m«$n».[0] <camelia> rakudo-moar 601cdb: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Unable to parse quote-words subscript; couldn't find right double-angle quote␤at <tmp>:1␤------> y $n = 'foo'; my $m = :42foo; $m«$n».[0]⏏<EOL>␤ expecting any of:␤ statement en…» <Zoffix__> m: my $n = 'foo'; my $m = :42foo; say $m<<$n>>.[0] <camelia> rakudo-moar 601cdb: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Unable to parse quote-words subscript; couldn't find right double-angle quote␤at <tmp>:1␤------> 'foo'; my $m = :42foo; say $m<<$n>>.[0]⏏<EOL>␤ expecting any of:␤ statement end…» I'd expect it to work the same as: <Zoffix__> m: my $n = 'foo'; my $m = :42foo; say ($m«$n»).[0] <camelia> rakudo-moar 601cdb: OUTPUT: «42␤» <Zoffix__> m: my $n = 'foo'; my $m = :42foo; say $m{$n}.[0] <camelia> rakudo-moar 601cdb: OUTPUT: «42␤» <Zoffix__> m: my $n = 'foo'; my $m = :42foo; say $m<foo>.[0] <camelia> rakudo-moar 601cdb: OUTPUT: «42␤»


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