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

Owner: Nobody
Requestors: elizabeth <liz [at]>

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

From: Elizabeth Mattijsen <liz [...]>
Subject: .splice loses containerization on replacement value
To: rakudobug [...]
Date: Sun, 16 Apr 2017 21:56:20 +0200
Download (untitled) / with headers
text/plain 1.6k
Actually reported as a SO question by brian d foy: <lizmat> m: my @a = [1,1],[2,2],[3,3]; dd @a; @a.splice: 0, 2, $[4,4]; dd @a # feels like a bug that the containerization of [4,4] is being ignored <+camelia> rakudo-moar 188711: OUTPUT: «Array @a = [[1, 1], [2, 2], [3, 3]]␤Array @a = [4, 4, [3, 3]]␤» <jnthn> lizmat: Yeah, it's because there's a candidate with @new at the end that it binds to, decontainerizing it in the process. <jnthn> So it's not actually hitting the slurpy at all <lizmat> so you agree it's wrong atm <jnthn> The slurpy is **@foo <jnthn> So in fact if it *was* hitting the slurpy it would be behaving right :) <jnthn> Yeah, it's wrong to discard the itemization <lizmat> ok, so we are in agreement <jnthn> I wonder if it was untested and then accidentally regressed when splice was optimized by breaking it out into a bunch of candidates <lizmat> will file a rakudobug <jnthn> Since I seem to recall splice getting at least something of a look during the GLR <jnthn> And I can't imagine we settled on "it ignores itemization" :) <jnthn> bisectable6: my @a = [1,1],[2,2],[3,3]; @a.splice: 0, 2, $[4,4]; dd @a <+bisectable6> jnthn, On both starting points (old=2015.12 new=1887114) the exit code is 0 and the output is identical as well <+bisectable6> jnthn, Output on both points: «Array @a = [4, 4, [3, 3]]» <jnthn> Hm, nope <jnthn> It's been like that since Christmas <lizmat> ok, doesn't make it right, though :-) <jnthn> Indeed <lizmat> but will wait for the release to look at fixing it <jnthn> *nod*

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

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