Skip Menu |
Report information
Id: 132211
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] combination of `andthen` and `orelse` causes closed over variable to never update
Download (untitled) / with headers
text/plain 357b
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␤»
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 608b
On Tue, 03 Oct 2017 08:07:41 -0700, cpan@zoffix.com wrote: Show quoted text
> 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: https://github.com/rakudo/rakudo/commit/1ee89b54074e80c Test: https://github.com/perl6/roast/commit/2f2998733a2d8132c


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org