# New Ticket Created by Michael Schaap
# Please include the string: [perl #130257]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=130257 >
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.