Skip Menu |
Report information
Id: 131508
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at]

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: [BUG] `state` with % is Sethash in whenever block ends up with a type object on second iteration
Download (untitled) / with headers
text/plain 711b
%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: «␤"foo")␤"foo")␤"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␤Tried to get the result of a broken Promise␤ in block <unit> at <tmp> line 1␤␤Original exception:␤ Cannot modify an immutable SetHash ((SetHash))␤ in block at <tmp> line 1␤␤»

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at