Skip to content
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

last inside a NEXT phaser in a loop does not abort the loop #3667

Closed
p6rt opened this issue Feb 5, 2015 · 4 comments
Closed

last inside a NEXT phaser in a loop does not abort the loop #3667

p6rt opened this issue Feb 5, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Feb 5, 2015

Migrated from rt.perl.org#123731 (status was 'resolved')

Searchable as RT123731$

@p6rt
Copy link
Author

p6rt commented Feb 5, 2015

From @masak

<masak> m​: for ^5 { .say; NEXT { last } }
<camelia> rakudo-moar 613c0b​: OUTPUT«0␤1␤2␤3␤4␤»
<masak> bug?
* masak submits rakudobug for `last` in a `NEXT` not exiting the for loop
<masak> m​: my $c = 3; while $c { say $c--; NEXT { last } };
<camelia> rakudo-moar 613c0b​: OUTPUT«3␤2␤1␤»

@p6rt
Copy link
Author

p6rt commented Dec 2, 2015

From @jnthn

On Wed Feb 04 17​:58​:57 2015, masak wrote​:

<masak> m​: for ^5 { .say; NEXT { last } }
<camelia> rakudo-moar 613c0b​: OUTPUT«0␤1␤2␤3␤4␤»
<masak> bug?
* masak submits rakudobug for `last` in a `NEXT` not exiting the for loop
<masak> m​: my $c = 3; while $c { say $c--; NEXT { last } };
<camelia> rakudo-moar 613c0b​: OUTPUT«3␤2␤1␤»

Fixed, and tests in S04-phasers/next.t.

@p6rt
Copy link
Author

p6rt commented Dec 2, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 2, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 2, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant