New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable lives outside of loop's scope #4331
Comments
From dvj@dagur.comThe following code: loop (my $i = 0;;) { } Gives the following error: Also, rakudo goes into a state where it hangs with 99% CPU usage. $ perl6 --version |
From dvj@dagur.comCorrection: rakudo does not hang, I didn't add a condition to the loop.
|
From @hoelzroHi, thanks for reporting this! Scope works a little differently in Perl 6 than in Perl 5; variables declared via my in the init/condition/update portion of loop are not scoped to the block. See http://design.perl6.org/S04.html#The_Relationship_of_Blocks_and_Declarations for more information. On 2015-06-18 14:35:54, dagur wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Thu Jun 18 22:48:07 2015, rob@hoelz.ro wrote:
Indeed; not a bug. |
@jnthn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#125434 (status was 'rejected')
Searchable as RT125434$
The text was updated successfully, but these errors were encountered: