summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-05-01 18:47:58 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2010-08-16 14:48:23 +0200
commitf175a6ef89290c8aae9bf1a2f98ab12aaa44292b (patch)
tree97675c0336a3a6bcb8aa19c4f47656a0fcdd623b /t
parente774d6049b5edab9f5afa9a304cdf25f70bd5d37 (diff)
downloadperl-f175a6ef89290c8aae9bf1a2f98ab12aaa44292b.tar.gz
fix [perl #74118] $[ assignment not noisy enough
Warn about list assignment to $[, as in "($[)=1", in addition to scalar assignment such as "$[=1".
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/op7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 4264615223..962ff5879f 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -1050,13 +1050,18 @@ Deprecated use of my() in false conditional at - line 8.
########
# op.c
$[ = 1;
+($[) = 1;
use warnings 'deprecated';
$[ = 2;
+($[) = 2;
no warnings 'deprecated';
$[ = 3;
+($[) = 3;
EXPECT
Use of assignment to $[ is deprecated at - line 2.
-Use of assignment to $[ is deprecated at - line 4.
+Use of assignment to $[ is deprecated at - line 3.
+Use of assignment to $[ is deprecated at - line 5.
+Use of assignment to $[ is deprecated at - line 6.
########
# op.c
use warnings 'void';