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

Cannot array-index after using «» (or << >>) indexing #6260

Open
p6rt opened this issue May 22, 2017 · 1 comment
Open

Cannot array-index after using «» (or << >>) indexing #6260

p6rt opened this issue May 22, 2017 · 1 comment

Comments

@p6rt
Copy link

@p6rt p6rt commented May 22, 2017

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

Searchable as RT131341$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented May 22, 2017

From @zoffixznet

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␤»

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.