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
Pair.WHICH distinguishes pairs with same container value #5579
Comments
From zefram@fysh.orgPair.WHICH has special behaviour if the pair's value is a container:
As you can see, both pairs are behaviourally equivalent, in that they The container case of .WHICH is using the default .WHICH that reflects the -zefram |
From @lizmatA Pair in which the value is a container, is mutable. And therefore cannot be a value type: $ 6 'my $p = a => my $ = 42; say $p.WHICH; $p.value = 666; say $p.WHICH' Note if the value is *not* a container: $ 6 'my $p = a => 42; say $p.WHICH; $p.value = 666; say $p.WHICH' I think this is ENOTABUG
|
The RT System itself - Status changed from 'new' to 'open' |
From zefram@fysh.orgElizabeth Mattijsen via RT wrote:
Not really. The *container* is mutable. The Pair can't be changed to
I've mutated something there, but it's not one of the pairs to -zefram |
From zefram@fysh.orgI wrote:
Upon further investigation, I think this requires multi method WHICH(Pair:D:) { That is, .VAR needs to be applied to $!value, which isn't currently in -zefram |
Migrated from rt.perl.org#128948 (status was 'open')
Searchable as RT128948$
The text was updated successfully, but these errors were encountered: