p4raw-id: //depot/perl@29036
proto++;
continue;
case '_':
+ /* _ must be at the end */
+ if (proto[1])
+ goto oops;
case '$':
proto++;
arg++;
require "./test.pl";
}
-plan(tests => 28);
+plan(tests => 30);
sub f($$_) { my $x = shift; is("@_", $x) }
g();
undef $expected; &g; # $_ not passed
{ $expected = my $_ = "bar"; g() }
+
+eval q{ sub wrong1 (_$); wrong1(1,2) };
+like( $@, qr/Malformed prototype for main::wrong1/, 'wrong1' );
+
+eval q{ sub wrong2 ($__); wrong2(1,2) };
+like( $@, qr/Malformed prototype for main::wrong2/, 'wrong2' );