From 27ffb73a493be4fd4322b04f1bcbdabe6dff523b Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 8 Apr 2013 16:27:19 +0200 Subject: More tests for the "Ambiguous use of ... resolved ..." warning S_scan_ident(). In particular, test that the special case for reporting $# as @ works. --- t/lib/warnings/toke | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 't/lib') 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' ; -- cgit v1.2.1