Skip Menu |
Report information
Id: 130941
Status: new
Priority: 0/
Queue: perl6

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

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



Subject: infix:<xx> keeps containers around since October, resulting in confusing behaviour
Download (untitled) / with headers
text/plain 1.1k
Original user with the problem: https://irclog.perlgeek.de/perl6/2017-03-06#i_14216611 The issue is code like: <Zoffix> m: my $y = 25; my $z = $y xx 10; say $z; $y = '♥'; say $z; <camelia> rakudo-moar 2a2e46: OUTPUT: «(25 25 25 25 25 25 25 25 25 25)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)␤» The `$y` container given to `xx` is stuffed into each item in the list, and as a result, updates to either item in the list or to the `$y` variable update all elements. This is pretty surprising and is very likely unwanted most of the time. bisectable points to an October 2016 commit as the cause: https://github.com/rakudo/rakudo/commit/d192f1c29a The type of the output of `xx` also got changed from a Seq to a List in that commit. <Zoffix> c: d192f1c29a^,d192f1c29a my $y = 25; my $z = $y xx 10; say $z; $y = '♥'; say $z; say $z <committable6> Zoffix, ¦d192f1c29a^: «(25 25 25 25 25 25 25 25 25 25)␤(25 25 25 25 25 25 25 25 25 25)␤(25 25 25 25 25 25 25 25 25 25)» ¦d192f1c: «(25 25 25 25 25 25 25 25 25 25)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)␤(♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥)»


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