This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix the implementation of list assignment to state().
[perl5.git] / t / lib / warnings / op
index 3c10751..8dadc7a 100644 (file)
@@ -1089,12 +1089,15 @@ state($x) = 1;
 (state $y) = 2;
 (state $z, my $t) = (3, 4);
 (state $foo, state $bar) = (5, 6);
+(undef, my $v, state $w) = (7 .. 9);
 no warnings 'misc';
 state($x) = 1;
 (state $y) = 2;
 (state $z, my $t) = (3, 4);
 (state $foo, state $bar) = (5, 6);
+(undef, my $v, state $w) = (7 .. 9);
 EXPECT
 State variable $z will be reinitialized at - line 6.
 State variable $foo will be reinitialized at - line 7.
 State variable $bar will be reinitialized at - line 7.
+State variable $w will be reinitialized at - line 8.