diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-04-17 20:17:14 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-04-17 20:17:14 +0000 |
commit | 12e06b6fd7025de6faae2a6f788653cc97790444 (patch) | |
tree | 9e09b8ea8350f170f2006d37c327c6bbbf1355c7 /t | |
parent | 057163d74a157c94a888de9b58451591c3760f6b (diff) | |
download | perl-12e06b6fd7025de6faae2a6f788653cc97790444.tar.gz |
Add "eliminate incorrect line numbers in warnings" to perltodo, and
a pair of TODO tests for the desired behaviour.
p4raw-id: //depot/perl@33709
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/9uninit | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 8c70a14485..fea20f0dca 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -1321,3 +1321,26 @@ my ($m1); exit $m1; EXPECT Use of uninitialized value $m1 in exit at - line 4. +######## +# TODO long standing bug - PL_curcop is not updated before the elsif +use warnings 'uninitialized'; +my $undef; + +if ($undef == 3) { +} elsif ($undef == 0) { +} +EXPECT +Use of uninitialized value $undef in numeric eq (==) at - line 4. +Use of uninitialized value $undef in numeric eq (==) at - line 5. +######## +# TODO long standing bug - more general variant of the above problem +use warnings; +my $undef; + +my $a = $undef + 1; +my $b + = $undef + + 1; +EXPECT +Use of uninitialized value $undef in addition (+) at - line 4. +Use of uninitialized value $undef in addition (+) at - line 7. |