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

Owner: Nobody
Requestors: perl6 [at] mscha.org
Cc:
AdminCc:

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



Subject: [BUG] state variable not initialized in some multi subs
From: Michael Schaap <perl6 [...] mscha.org>
To: rakudobug [...] perl.org
Date: Sun, 4 Dec 2016 14:53:35 +0100
Download (untitled) / with headers
text/plain 434b
In this example, the state variable appears not to be initialized: multi sub foo(Int $x where 1..10) { state $bar = 42; say $bar; } foo(3); # Output: (Any) When you remove the "where 1..10" clause, it works fine. Or alternatively, remove the "multi" and it works fine as well. Using Rakudo Star 2016.11: This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c.


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

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