[perl #132211] [BUG] combination of `andthen` and `orelse` causes closed over variable to never update

[email protected] ("Zoffix Znet via RT")
Newsgroups perl.perl6.compiler
Message-ID <[email protected]>
On Tue, 03 Oct 2017 08:07:41 -0700, [email protected] 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:  https://github.com/rakudo/rakudo/commit/1ee89b54074e80c
Test: https://github.com/perl6/roast/commit/2f2998733a2d8132c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.