File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ A subclass of L<C<ObjAt>|/type/ObjAt> that should be used to indicate that a cla
1010produces objects that are value types - in other words, that are immutable after
1111they have been initialized.
1212
13- my %h = a => 42; # mutable Hash
14- dd %h.WHICH; # OUTPUT: «ObjAt.new("Hash|1402...888 ")»
13+ my %h = a => 42; # mutable Hash
14+ say %h.WHICH.raku ; # OUTPUT: «ObjAt.new("Hash|2972851925856 ")»
1515
16- my $date = Date.new(2025,7,20); # immutable Date
17- say $date.WHICH; # OUTPUT: «ValueObjAt.new("Date|60876")»
16+ my $date = Date.new(2025,7,20); # immutable Date
17+ say $date.WHICH.raku; # OUTPUT: «ValueObjAt.new("Date|60876")»
1818
1919If you create a class that should be considered a value type, you should add
2020a C<WHICH> method to that class that returns a C<ValueObjAt> object, for
You can’t perform that action at this time.
0 commit comments