[perl #129115] [BUG] loop doesn't allow the redeclaration of the symbol

2016-08-29 Thread Sam S. via RT
I found an old IRC discussion where TimToday specifically confirms that the `loop` construct doesn't get an exception to the consistent scoping rules of `my` variables: mikemol for(int foo; foo < n; ++foo) { /* some code */ } ; /* use

[perl #129115] [BUG] loop doesn't allow the redeclaration of the symbol

2016-08-28 Thread Sam S. via RT
Not a bug, as S04 explains: Blocks are delimited by curlies, or by the beginning and end of the current compilation unit (either the current file or the current EVAL string). Unlike in Perl 5, there are (by policy) no implicit blocks aro

[perl #129115] [BUG] loop doesn't allow the redeclaration of the symbol

2016-08-28 Thread via RT
# New Ticket Created by Itsuki Toyota # Please include the string: [perl #129115] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129115 > See the following results. $ perl6 -e 'loop (my $foo;0;){}; loop (my $foo;0;){}' Potent