On Thu, 11 Aug 2016 09:24:31 -0700, coke wrote:
> On Wed Oct 28 13:40:45 2015, gfldex wrote:
> > sub foo(@a is copy, :$flag){ say @a };
> > my @a = 1,2;
> > (&foo.assuming(:flag))(@a);
> >
> > # OUTPUT«replace this Array is copy logic in sub __PRIMED_ANON at
> > EVAL_2:2 in sub __PRIMED_ANON at
> > EVAL_2:1 in block <unit> at /tmp/TlcJQPUFbc:1
>
> Coming from:
>
> src/Perl6/Metamodel/BOOTSTRAP.nqp
> 435: nqp::die('replace this Array is copy logic');
>
> Which is right below a
>
> # XXX GLR
>
> which appears 8 times in rakudo's src/ dir.
>
Yeah this has nothing to do with .assuming. Any '@ is copy' that hits the
slowpath binder will hit this. Currently a way to force hitting the slowpath
binder
is to provide a named parameter with a lot of alternate names:
$ perl6 -e 'sub foo(@a is copy, :f(:g(:h(:$i)))){ @a }; my @a = 1,2;
&foo(@a).say;'
replace this Array is copy logic
in sub foo at -e line 1
in block <unit> at -e line 1
It's just that many (all?) things that get munged through .assuming hit that
binder.