This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #77762] Constant assignment warning
[perl5.git] / op.c
diff --git a/op.c b/op.c
index 20083ad..469a008 100644 (file)
--- a/op.c
+++ b/op.c
@@ -910,7 +910,8 @@ S_scalarboolean(pTHX_ OP *o)
 
     PERL_ARGS_ASSERT_SCALARBOOLEAN;
 
-    if (o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST) {
+    if (o->op_type == OP_SASSIGN && cBINOPo->op_first->op_type == OP_CONST
+     && !(cBINOPo->op_first->op_flags & OPf_SPECIAL)) {
        if (ckWARN(WARN_SYNTAX)) {
            const line_t oldline = CopLINE(PL_curcop);