# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #125659] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=125659 >
<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.