diff options
author | Renee Baecker <renee.baecker@smart-websolutions.de> | 2008-05-26 15:08:27 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-06-08 08:57:00 +0000 |
commit | 9e8d7757ba54bcb0e5a4571f5fbc9ca113df7b70 (patch) | |
tree | 8aa1e7627266014fa11374457c5e47303e9416da /t/lib | |
parent | 26ab4e07be0b42218adc42b9cf6c2f4b2adf2d2f (diff) | |
download | perl-9e8d7757ba54bcb0e5a4571f5fbc9ca113df7b70.tar.gz |
Add a new warning, "Prototype after '%s'"
Based on:
Subject: Re: [perl #36673] sub foo(@$) {} should generate an error
Message-ID: <483A9A2B.6020808@smart-websolutions.de>
p4raw-id: //depot/perl@34021
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/warnings/toke | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index f4842a7d0c..b82268de16 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -852,3 +852,26 @@ use warnings 'deprecated'; our $bar :unique; EXPECT Use of :unique is deprecated at - line 4. +######## +# toke.c +use warnings "syntax"; +sub proto_after_array(@$); +sub proto_after_arref(\@$); +sub proto_after_arref2(\[@$]); +sub proto_after_arref3(\[@$]_); +sub proto_after_hash(%$); +sub proto_after_hashref(\%$); +sub proto_after_hashref2(\[%$]); +sub underscore_last_pos($_); +sub underscore2($_;$); +sub underscore_fail($_$); +sub underscore_after_at(@_); +no warnings "syntax"; +sub proto_after_array(@$); +sub proto_after_hash(%$); +sub underscore_fail($_$); +EXPECT +Prototype after '@' for main::proto_after_array : @$ at - line 3. +Prototype after '%' for main::proto_after_hash : %$ at - line 7. +Illegal character in prototype for main::underscore_fail : $_$ at - line 12. +Prototype after '@' for main::underscore_after_at : @_ at - line 13. |