Test ambiguous warning with (;$) proto
authorFather Chrysostomos <sprout@cpan.org>
Thu, 24 Nov 2011 16:27:13 +0000 (08:27 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 24 Nov 2011 16:27:56 +0000 (08:27 -0800)
t/lib/warnings/toke

index faef138..cb1dbca 100644 (file)
@@ -607,6 +607,12 @@ Warning: Use of "rand" without parentheses is ambiguous at - line 3.
 Warning: Use of "rand" without parentheses is ambiguous at - line 8.
 Warning: Use of "rand" without parentheses is ambiguous at - line 10.
 ########
+# [perl #97110]
+sub myrand(;$) { }
+my $a = myrand + 4 ;
+EXPECT
+Warning: Use of "myrand" without parentheses is ambiguous at - line 3.
+########
 # toke.c
 use warnings "ambiguous";
 print for keys %+; # should not warn