# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #116521] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116521 >
I'm not one to use "it's broken" as a bug ticket description -- I think it's bad style. But this is the exception that proves the rule: somehow state not only isn't doing what it says on the tin, but it breaks parsing, too. <masak> nr: sub f { say ++state $ ; }; f; f; f <p6eval> rakudo a26956: OUTPUT«111» <p6eval> ..niecza v24-18-gaf64300: OUTPUT«123» * masak submits rakuobug <masak> what's worse: <masak> nr: sub f { say ++(state $ = 0); }; f; f; f <p6eval> rakudo a26956: OUTPUT«===SORRY!===Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling block f: Error while compiling op p6typecheckrv: Error while compiling op lexotic: Error while compiling op p6decontrv: Error while compili… <p6eval> ..niecza v24-18-gaf64300: OUTPUT«123» Niecza has it right both times.