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
Subtle action-at-a-distance bond broken after seemingly innocent reading operation on array created with Array.new in Rakudo #2669
Comments
From @masak<felher> After i had a problem with a program i golfed down the issue |
From @usev6This bug is still present. I added a test (fudged 'todo') to S32-array/pop.t with commit Raku/roast@046ad7e7e4 |
1 similar comment
From @usev6This bug is still present. I added a test (fudged 'todo') to S32-array/pop.t with commit Raku/roast@046ad7e7e4 |
@usev6 - Status changed from 'new' to 'open' |
From @usev6Post-GLR the read operation with $x.key[0] isn't necessary to get the buggy behaviour: < bartolin> m: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; @a.pop(); say $x; # is that change with glr known/wanted |
1 similar comment
From @usev6Post-GLR the read operation with $x.key[0] isn't necessary to get the buggy behaviour: < bartolin> m: my $x; my @a = 1,2; $x = Array.new(@a) => 'x'; @a.pop(); say $x; # is that change with glr known/wanted |
From @ninerThe current behavior is correct due to the one item rule. Array.new(@a) essentially creates a copy of @a. Thus changing @a will not affect the new array. |
@niner - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#111720 (status was 'resolved')
Searchable as RT111720$
The text was updated successfully, but these errors were encountered: