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

Internal error when doing $::<a> in Rakudo #4424

Open
p6rt opened this issue Jul 21, 2015 · 3 comments
Open

Internal error when doing $::<a> in Rakudo #4424

p6rt opened this issue Jul 21, 2015 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 21, 2015

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

Searchable as RT125659$

@p6rt
Copy link
Author

p6rt commented Jul 21, 2015

From @masak

<jaffa4> m​: class m { has $.a; method m1() { $​::<!a"> = 1; } }
; my $c = m.new(); $c.m1();
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<ShimmerFairy> m​: my $a; :​:<$a> = 5; say $a
<camelia> rakudo-moar 27f88c​: OUTPUT«5␤»
<ShimmerFairy> m​: my $a; $​::<a> = 5; say $a
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<FROGGS> ShimmerFairy​: yeah, should probably do the same as $​::("a")
<ShimmerFairy> m​: my $a; $​::{"a"} = 5; say $a # also broken, at least to me
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<masak> m​: $​::<a>
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
* masak submits rakudobug

Whether the $a exists in the scope or not, the "Index out of bounds"
error arguably shouldn't occur in either of those cases. It's OK for
the lookup to fail, but preferably in a more explanatory way.

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

From @AlexDaniel

Still reproducible (2017.11,HEAD(e5b660e)), but now it prints a different message​:

===SORRY!=== Error while compiling -e
Variable '$' is not declared
at -e​:1
------> my $a; ⏏$​::<a> = 5; say $a

On 2015-07-21 04​:59​:56, masak wrote​:

<jaffa4> m​: class m { has $.a; method m1() { $​::<!a"> = 1; } }
; my $c = m.new(); $c.m1();
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<ShimmerFairy> m​: my $a; :​:<$a> = 5; say $a
<camelia> rakudo-moar 27f88c​: OUTPUT«5␤»
<ShimmerFairy> m​: my $a; $​::<a> = 5; say $a
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<FROGGS> ShimmerFairy​: yeah, should probably do the same as $​::("a")
<ShimmerFairy> m​: my $a; $​::{"a"} = 5; say $a # also broken, at least to me
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
<masak> m​: $​::<a>
<camelia> rakudo-moar 27f88c​: OUTPUT«===SORRY!===␤MVMArray​: Index out
of bounds␤»
* masak submits rakudobug

Whether the $a exists in the scope or not, the "Index out of bounds"
error arguably shouldn't occur in either of those cases. It's OK for
the lookup to fail, but preferably in a more explanatory way.

@p6rt
Copy link
Author

p6rt commented Dec 3, 2017

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

@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