make sure a pad op's flags are updated after optimising away
the assignment in my @a = () (see change 22520).
p4raw-id: //depot/perl@22781
&& (left->op_private & OPpLVAL_INTRO))
{
op_free(right);
+ left->op_flags &= ~(OPf_REF|OPf_SPECIAL);
return left;
}
curop = list(force_list(left));
# $RCSfile: my.t,v $
-print "1..31\n";
+print "1..33\n";
sub foo {
my($a, $b) = @_;
# Supposed to be copy-on-write via force_normal after a THINKFIRST check.
print "$full $fonts{nok}\n";
}
+
+# [perl #29340] optimising away the = () left the padav returning the
+# array rather than the contents, leading to 'Bizarre copy of array' error
+
+sub opta { my @a=() }
+sub opth { my %h=() }
+eval { my $x = opta };
+print "not " if $@;
+print "ok 32\n";
+eval { my $x = opth };
+print "not " if $@;
+print "ok 33\n";