# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #74756] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74756 >
<masak> rakudo: my $*a = 42; foo; sub foo { say $*a; my $*a } <p6eval> rakudo 72f914: OUTPUT«Any()» <masak> what's a reasonable expectation here? <masak> should it be a compile error? <masak> std: my $*a = 42; foo; sub foo { say $*a; my $*a } <p6eval> std 30494: OUTPUT«ok 00:01 110m» <PerlJam> masak: re code above--error <masak> PerlJam: good. that's all I need to hear. * masak submits rakudobug <masak> rakudo: say $*a; my $*a = 42 <p6eval> rakudo 72f914: OUTPUT«Any()» <masak> ah, that's an even simpler error case. <jnthn> Probably wants to die at compile time.<masak> std: my $a; { say $a; my $a } # it's a bit like this, actually <p6eval> std 30494: OUTPUT«[31m===[0mSORRY![31m===[0mLexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as OUTER::<$a> before can unambiguously declare a new '$a' in this scope [...] <jnthn> masak: Right, it's exactly that. <jnthn> masak: Rakudo gets that wrong too - it'll be the same fix for both. <masak> jnthn: right. still reporting this one separately, just in case.