SV ** const firstlelem = PL_stack_base + POPMARK + 1;
register SV ** const firstrelem = lastlelem + 1;
const I32 arybase = CopARYBASE_get(PL_curcop);
- I32 is_something_there = PL_op->op_flags & OPf_MOD;
+ I32 is_something_there = FALSE;
register const I32 max = lastrelem - lastlelem;
register SV **lelem;
}
require "test.pl";
-plan( tests => 52 );
+plan( tests => 57 );
@foo = (1, 2, 3, 4);
cmp_ok($foo[0], '==', 1, 'first elem');
my $size = scalar(()[1..1]);
cmp_ok($size,'==','0','size nil');
}
+
+{
+ # perl #39882
+ sub test_zero_args {
+ my $test_name = shift;
+ is(scalar(@_), 0, $test_name);
+ }
+ test_zero_args("simple list slice", (10,11)[2,3]);
+ test_zero_args("grepped list slice", grep(1, (10,11)[2,3]));
+ test_zero_args("sorted list slice", sort((10,11)[2,3]));
+ test_zero_args("assigned list slice", my @tmp = (10,11)[2,3]);
+ test_zero_args("do-returned list slice", do { (10,11)[2,3]; });
+}
+