This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #25824] Segmentation fault with
[perl5.git] / t / comp / parser.t
index 730f187..e59fec6 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
 }
 
 require "./test.pl";
-plan( tests => 42 );
+plan( tests => 43 );
 
 eval '%@x=0;';
 like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
@@ -141,3 +141,9 @@ EOF
     eval q{ *foo{CODE} ? 1 : 0 };
     is( $@, '', "glob subscript in conditional" );
 }
+
+# Bug #25824
+{
+    eval q{ sub f { @a=@b=@c;  {use} } };
+    like( $@, qr/syntax error/, "use without body" );
+}