# New Ticket Created by Zoffix Znet
# Please include the string: [perl #131508]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131508 >
%goods here works as expected:
<Zoffix__> m: my %goods is SetHash; react whenever Supply.interval(.3) { $++ >
3 and done; dd %goods; %goods<foo>++; }
<camelia> rakudo-moar 3755c0: OUTPUT:
«SetHash.new()SetHash.new("foo")SetHash.new("foo")SetHash.new("foo")»
On second iteration ends up being a type object:
<Zoffix__> m: react whenever Supply.interval(.3) { state %goods is SetHash; $++
> 3 and done; dd %goods; %goods<foo>++; }
<camelia> rakudo-moar 3755c0: OUTPUT: «SetHash.new()SetHashTried to get the
result of a broken Promise in block <unit> at <tmp> line 1Original
exception: Cannot modify an immutable SetHash ((SetHash)) in block
at <tmp> line 1»