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

combination of andthen and orelse causes closed over variable to never update #6554

Closed
p6rt opened this issue Oct 3, 2017 · 3 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Oct 3, 2017

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

Searchable as RT132211$

@p6rt
Copy link
Author

p6rt commented Oct 3, 2017

From @zoffixznet

IRC​: https://irclog.perlgeek.de/perl6/2017-10-03#i_15250878

Reads "aaa", not "abc"​:
  15​:05 Zoffix m​: for <a b c> { $^v.uc andthen say $v orelse .say }
  15​:05 camelia rakudo-moar f946bd​: OUTPUT​: «a␤a␤a␤»
 
But this works fine​:
  15​:06 m​: for <a b c> { $^v.uc andthen say $v }
  15​:06 camelia rakudo-moar f946bd​: OUTPUT​: «a␤b␤c␤»

@p6rt
Copy link
Author

p6rt commented Jan 26, 2018

From @zoffixznet

On Tue, 03 Oct 2017 08​:07​:41 -0700, cpan@​zoffix.com wrote​:

IRC​: https://irclog.perlgeek.de/perl6/2017-10-03#i_15250878

Reads "aaa", not "abc"​:
15​:05 Zoffix m​: for <a b c> { $^v.uc andthen say $v orelse .say }
15​:05 camelia rakudo-moar f946bd​: OUTPUT​: «a␤a␤a␤»

But this works fine​:
15​:06 m​: for <a b c> { $^v.uc andthen say $v }
15​:06 camelia rakudo-moar f946bd​: OUTPUT​: «a␤b␤c␤»

Thank you for the report. This is now fixed.

Fix​: rakudo/rakudo@1ee89b54074e80c
Test​: Raku/roast@2f2998733a2d8132c

@p6rt
Copy link
Author

p6rt commented Jan 26, 2018

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

@p6rt p6rt closed this as completed Jan 26, 2018
@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