# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #102994]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=102994 >


16:28 < moritz> perl6: sub f($x) { return if $x == 1; state %h = a => 1;
say
                %h.perl }; f 1; f 2;
16:28 <+p6eval> niecza v11-20-gb962c2f: OUTPUT«{"a" => 1}.hash␤»
16:28 <+p6eval> ..pugs b927740: OUTPUT«{("a" => 1),}␤»
16:28 <+p6eval> ..rakudo 9c2880: OUTPUT«().hash␤»

I'm pretty sure that's a bug (and not limited to hashes, same for scalar
state vars).

I've added a test to S04-declarations/state.t

Reply via email to