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

repeat while loop not being entered when inside a routine and block #5140

Closed
p6rt opened this issue Feb 18, 2016 · 5 comments
Closed

repeat while loop not being entered when inside a routine and block #5140

p6rt opened this issue Feb 18, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Feb 18, 2016

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

Searchable as RT127563$

@p6rt
Copy link
Author

p6rt commented Feb 18, 2016

From @Skarsnik

<masak> m​: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A
$c"; foo($c -1) } while 0 } }; foo(3)
<camelia> rakudo-moar 027096​: OUTPUT«B 3␤A 3␤B 2␤»

Should not stop and continue :)

--
Sylvain "Skarsnik" Colinet

Victory was near but the power of the ring couldn't be undone

@p6rt
Copy link
Author

p6rt commented Jul 11, 2016

From @zoffixznet

Still present today in rakudo de5d9e​:

<Zoffix> m​: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A $c"; foo($c -1) } while 0 } }; foo(3)
<camelia> rakudo-moar de5d9e​: OUTPUT«B 3␤A 3␤B 2␤»

Also, discovered this related bug while testing​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128596

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

From @TimToady

The repeat and loop constructs weren't properly self-sinking at statementlist level.

Fixed in 589061eac14f2847e2c4b401d2ff2eb30c62675e

Test in cbbff3ba0f1120fe7dfded0a980f9b73263f0868

1 similar comment
@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

From @TimToady

The repeat and loop constructs weren't properly self-sinking at statementlist level.

Fixed in 589061eac14f2847e2c4b401d2ff2eb30c62675e

Test in cbbff3ba0f1120fe7dfded0a980f9b73263f0868

@p6rt
Copy link
Author

p6rt commented Aug 6, 2016

@TimToady - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Aug 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant