Skip Menu |
Report information
Id: 131307
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at]

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: warning-less sub closure over a variable declared later in same scope
Download (untitled) / with headers
text/plain 657b 16:35 Zoffix m: my $x = 72; { sub foo { say $x }; foo ; my $x = 42; say $x } 16:35 camelia rakudo-moar 83b7ac: OUTPUT: «(Any)␤42␤» 16:37 TimToady should probably get the "already bound to outer symbol" warning 16:37 m: my $x = 72; { say $x; my $x = 42; say $x } 16:37 camelia rakudo-moar 83b7ac: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Lexical symbol '$x' is already bound to an outer symbol;␤the implicit outer binding must be rewritten as OUTER::<$x>␤before you can unambiguously declare a new '$x' in this scope␤at <tmp>:1␤------>…» 16:38 TimToady like that one

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at