diff options
author | Nicholas Clark <nick@ccl4.org> | 2013-04-08 16:27:19 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-22 10:31:30 +0200 |
commit | 27ffb73a493be4fd4322b04f1bcbdabe6dff523b (patch) | |
tree | b7106e202d9652ad2f945c05d8dc89c5d76bb93b /t/lib | |
parent | 5fb91d484fee378b489da85e763d4ae7df3f2baa (diff) | |
download | perl-27ffb73a493be4fd4322b04f1bcbdabe6dff523b.tar.gz |
More tests for the "Ambiguous use of ... resolved ..." warning S_scan_ident().
In particular, test that the special case for reporting $# as @ works.
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/warnings/toke | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 5ee3ad5210..df2a0b4e2f 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -425,10 +425,25 @@ EXPECT # toke.c use warnings 'ambiguous' ; $a = ${time} ; +$a = @{time} ; +$a = $#{time} ; # This one is special cased in toke.c +$a = %{time} ; +$a = *{time} ; +$a = defined &{time} ; # To avoid calling &::time no warnings 'ambiguous' ; $a = ${time} ; +$a = @{time} ; +$a = $#{time} ; # This one is special cased in toke.c +$a = %{time} ; +$a = *{time} ; +$a = defined &{time} ; # To avoid calling &::time EXPECT Ambiguous use of ${time} resolved to $time at - line 3. +Ambiguous use of @{time} resolved to @time at - line 4. +Ambiguous use of @{time} resolved to @time at - line 5. +Ambiguous use of %{time} resolved to %time at - line 6. +Ambiguous use of *{time} resolved to *time at - line 7. +Ambiguous use of &{time} resolved to &time at - line 8. ######## # toke.c use warnings 'ambiguous' ; |