diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 20:23:29 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-01 20:23:29 +0000 |
commit | e5edeb50dffa2b3a1d6245f54a443cff2a31eb3f (patch) | |
tree | 36257f25923e4869688feeff47168f70806fe1c2 /t | |
parent | 4c32f29ba9da41e214e9e03a44a530ee0427f19a (diff) | |
download | perl-e5edeb50dffa2b3a1d6245f54a443cff2a31eb3f.tar.gz |
Some help for 20001130.011. Now one gets warnings like
"Ambiguous -f() resolved as a file test ..."
p4raw-id: //depot/perl@7944
Diffstat (limited to 't')
-rw-r--r-- | t/pragma/warn/toke | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/pragma/warn/toke b/t/pragma/warn/toke index 2c9433bd7d..1f8b14283a 100644 --- a/t/pragma/warn/toke +++ b/t/pragma/warn/toke @@ -123,6 +123,9 @@ toke.c AOK Ambiguous use of %c resolved as operator %c *foo *foo + Ambiguous -f%c call resolved as a file test [yylex] + sub f { }; -f(0) + __END__ # toke.c use warnings 'deprecated' ; @@ -564,3 +567,19 @@ no warnings 'ambiguous'; "@mjd_previously_unused_array"; EXPECT Possible unintended interpolation of @mjd_previously_unused_array in string at - line 3. +######## +# toke.c +use warnings 'ambiguous'; +sub f { 24 } +-f("TEST"); +print - f("TEST"); +print -(f("TEST")); +print -f ("TEST"); +print -f "TEST"; +sub Q { 42 }; +print -Q(); +EXPECT +Ambiguous -f() resolved as a file test at - line 4. +Ambiguous -f() resolved as a file test at - line 7. +-24-2411-42 + |