Skip to content

Commit f3f0955

Browse files
tonycozmauke
authored andcommitted
subsignature_append_positional: flags is only used in the else
1 parent ba2623c commit f3f0955

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

op.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -16543,12 +16543,6 @@ Perl_subsignature_append_positional(pTHX_ OP *varop, OPCODE defmode, OP *defexpr
1654316543
if(defexpr) {
1654416544
signature->optelems++;
1654516545

16546-
I32 flags = 0;
16547-
if(defmode == OP_DORASSIGN)
16548-
flags |= OPpARG_IF_UNDEF << 8;
16549-
if(defmode == OP_ORASSIGN)
16550-
flags |= OPpARG_IF_FALSE << 8;
16551-
1655216546
if(defexpr->op_type == OP_NULL && !(defexpr->op_flags & OPf_KIDS))
1655316547
{
1655416548
/* caller passed in newOP(OP_NULL, 0), so we should not leak it */
@@ -16559,6 +16553,12 @@ Perl_subsignature_append_positional(pTHX_ OP *varop, OPCODE defmode, OP *defexpr
1655916553
yyerror("Optional parameter lacks default expression");
1656016554
}
1656116555
else {
16556+
I32 flags = 0;
16557+
if(defmode == OP_DORASSIGN)
16558+
flags |= OPpARG_IF_UNDEF << 8;
16559+
if(defmode == OP_ORASSIGN)
16560+
flags |= OPpARG_IF_FALSE << 8;
16561+
1656216562
/* a normal '=default' expression */
1656316563
OP *defop = newARGDEFELEMOP(flags, defexpr, argix);
1656416564

0 commit comments

Comments
 (0)