Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing and 'is copy' array parameters interact badly in Rakudo #1697

Closed
p6rt opened this issue Apr 16, 2010 · 4 comments
Closed

Indexing and 'is copy' array parameters interact badly in Rakudo #1697

p6rt opened this issue Apr 16, 2010 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 16, 2010

Migrated from rt.perl.org#74430 (status was 'resolved')

Searchable as RT74430$

@p6rt
Copy link
Author

p6rt commented Apr 16, 2010

From @masak

<colomon> rakudo​: my @​a = 1..10; say @​a.PARROT; @​a.splice(0, 1); say @​a
<p6eval> rakudo 78faa0​: OUTPUT«Array␤2345678910␤»
<colomon> rakudo​: my @​a = 'a'..'g'; say @​a.PARROT; @​a.splice(0,1); say @​a;
<p6eval> rakudo 78faa0​: OUTPUT«Array␤bcdefg␤»
<colomon> rakudo​: sub foo(@​items is copy) { @​items.splice(0, 1); say
@​items; }; my
  @​items = 'a'..'g'; foo(@​items);
<p6eval> rakudo 78faa0​: OUTPUT«No applicable candidates found to
dispatch to for 'postcircumfix​:<[ ]>'. Available candidates are​:␤​:(Mu
: Int $i;; *%_)␤​:(Mu : Block $b;; *%_)␤​:(Mu :
!whatever_dispatch_helper ;; *%_) [...]
<colomon> bingo
<colomon> bug?
<jnthn> huh, wtf.
<jnthn> Yes, I think bug.
<jnthn> is copy fail maybe?
<pmichaud> that'd be my guess.
<colomon> is copy fail of some sort, it seems.
<jnthn> Weird.
<colomon> rakudo​: sub foo(@​items is copy) { say @​items[0..^1]; say
@​items; }; my @​items = 'a'..'g'; foo(@​items); say @​items;
<p6eval> rakudo 78faa0​: OUTPUT«No applicable candidates found to
dispatch to for 'postcircumfix​:<[ ]>'. Available candidates are​:␤​:(Mu
: Int $i;; *%_)␤​:(Mu : Block $b;; *%_)␤​:(Mu :
!whatever_dispatch_helper ;; *%_) [...]
<colomon> There you go.
<masak> rakudobug?
<colomon> masak​: totally.
* masak submits
<pmichaud> rakudo​: sub foo(@​items is copy) { say PARROT(@​items); };
my @​items = 'a'..'g'; foo(@​items);
<p6eval> rakudo 78faa0​: OUTPUT«ObjectRef->Array␤»
<pmichaud> that "ObjectRef->Array" seems suspect.
<jnthn> yeah, moze byt
<jnthn> Perhaps a binder tweak is needed.

@p6rt
Copy link
Author

p6rt commented Jan 14, 2013

From @timo

committed a passing test in dee9fde.

@p6rt
Copy link
Author

p6rt commented Jan 14, 2013

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 14, 2013

@timo - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jan 14, 2013
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant