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
.clone not doing the right kinda thing with arrays in Rakudo #2737
Comments
From @masak<gfldex> i may have found another bug and you wont like that one :) |
From @masak<gfldex> r: https://gist.github.com/2519842 |
@masak - Status changed from 'new' to 'open' |
From @diakopterOn Sat Apr 28 09:10:16 2012, masak wrote:
None of the 3 versions of that gist segfaults any longer on the latest |
From @diakopterOn Tue May 29 17:43:29 2012, diakopter wrote:
(but the original issue is still existing. |
From @niner13:49 <+yoleaux> 17 Oct 2015 17:45Z <jnthn> nine: IIRC, it was .clone not being deep enough, but I don't remember exactly either :( |
From @peschwaOn Sun Oct 18 04:50:28 2015, nine@detonation.org wrote:
Current behavior: 14:17 < psch> r: role R { has @.s is rw }; multi trait_mod:<is>(Routine $r, :$x!) { $r does R; sub h(|){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b # slightly adapted from RT #112666 Note that this is code snippet that doesn't explicitly vivify $r.s in the trait declaration, yet the output matches the one that does: 14:22 <psch> r: role R { has @.s is rw }; multi trait_mod:<is>(Routine $r, :$x!) { $r does R; $r.s; sub h(|){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b |
From @jnthnOn Wed Nov 18 06:24:03 2015, peschwa@gmail.com wrote:
This suggested the bug was fixed. I tried the code on its own. Worked. Put it in a test file. Failed. Wait, what? Turns out the significant difference was the whole lot being in a nested block. The original bug never went away, but an optimization hid it. And the bug itself came from an optimization involving lazy allocation of attribute storage, which we just can't rely on getting away with when doing mixins to meta-objects. So, fixed that. Test in S14-traits/routines.t. |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#112666 (status was 'resolved')
Searchable as RT112666$
The text was updated successfully, but these errors were encountered: