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.

Reply via email to