Skip Menu |
Report information
Id: 126477
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: gfldex <wenzel.peppmeyer [at] gmx.de>
Cc:
AdminCc:

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



Date: Wed, 28 Oct 2015 21:40:21 +0100 (CET)
Subject: [glr] .assuming on sub with is copy parameter fails
To: rakudobug [...] perl.org
From: "Wenzel P. P. Peppmeyer" <wenzel.peppmeyer [...] gmx.de>
Download (untitled) / with headers
text/plain 243b
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␤
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 527b
On Wed Oct 28 13:40:45 2015, gfldex wrote: Show quoted text
> 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. -- Will "Coke" Coleda
On Thu, 11 Aug 2016 09:24:31 -0700, coke wrote: Show quoted text
> 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.


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