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
method freeze(Pair:D:) changes object identity #6442
Comments
From p.dumarchie@gmail.comThis is Rakudo version 2017.07 built on MoarVM version 2017.07 If the value of a Pair is a Scalar container, then the Pair can be > my $value = 0; Method freeze make the value of the Pair read-only, by removing it from its > $pair.freeze; The problem is that freeze does more than that. It changes the object > $pair = number => $value; Now by itself having a 2-tuple that is identified by its two elements is a For example, a SetHash represents a mutable set. The Set method returns a > $pair = number => $value; But because freezing a Pair changes the identity of the _original_ object > $pair.freeze; I think it's clear that changing the identity of the original object is not Now I can imagine that at some implementation level there are benefits to |
From @lizmatFixed with rakudo/rakudo@c229022cb0 , tests needed
|
The RT System itself - Status changed from 'new' to 'open' |
From @dogbert17On Sun, 13 Aug 2017 15:14:41 -0700, elizabeth wrote:
Test added with commit Raku/roast@d7d42d6c37 |
@dogbert17 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#131887 (status was 'resolved')
Searchable as RT131887$
The text was updated successfully, but these errors were encountered: