summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-07-07 09:50:35 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-07-07 09:50:35 +0000
commit9fdc7570b9ab74673d2bcedaa774679d10c80ea0 (patch)
treefb58948a2ef5281ed90e5f6474df00cbab02bdf7 /t
parent3d2c6be36ee5077d71cd3403ed02f6b1b3f5f3c2 (diff)
downloadperl-9fdc7570b9ab74673d2bcedaa774679d10c80ea0.tar.gz
Fix the implementation of list assignment to state().
p4raw-id: //depot/perl@28499
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/op3
-rw-r--r--t/op/state.t2
2 files changed, 3 insertions, 2 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 3c10751d5e..8dadc7aa85 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -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.
diff --git a/t/op/state.t b/t/op/state.t
index becbb3b0a6..92b4dfc02f 100644
--- a/t/op/state.t
+++ b/t/op/state.t
@@ -164,6 +164,4 @@ sub statelist2 {
$ls = statelist2();
is($ls, "2/3", 'list assignment to state scalars');
$ls = statelist2();
-{ local our $TODO = 'detection of state vars is misplaced in newASSIGNOP';
is($ls, "3/4", 'list assignment to state scalars');
-}