Skip Menu |
Report information
Id: 131483
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: [LTA] Inconsistent resultant type of `+@` slurpy when given a Seq
Download (untitled) / with headers
text/plain 923b
Some discussion: https://irclog.perlgeek.de/perl6-dev/2017-06-02#i_14675550 The crux of it is the type of `+@` slurpy changes, depending on the input, though on further examinations it seems only Seq is affected: m: sub grab(+@a) { dd @a }; grab %(:42a, :72b); grab (1, (2, 3)); grab [1, (2, 3)]; grab (1, (2, 3)).Seq rakudo-moar 348891: OUTPUT: «[:a(42), :b(72)]␤[1, (2, 3)]␤[1, (2, 3)]␤(1, (2, 3))␤» In all of the examples above, the `@a` ends up being an Array, except for the last case (with Seq input), where it's a List. This leads to two issues: 1) The inner list of the Seq did not get containerized, so we have inconsistencies in how the `+@` slurpy flattens 2) The List is immutable, so doing something like `@a[42] = 70` is currently never safe with a `+@` slurpy, because for some inputs it might end up being a List. Seems like the Seq case needs fixing so it ends up being an Array as well.


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