Skip to content

Commit

Permalink
Merge fbdc075 into 1e43c13
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed May 11, 2021
2 parents 1e43c13 + fbdc075 commit 2df5659
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions op.c
Expand Up @@ -4291,6 +4291,8 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)

switch (o->op_type) {
case OP_UNDEF:
if (type == OP_SASSIGN)
goto nomod;
PL_modcount++;
goto do_next;

Expand Down
4 changes: 2 additions & 2 deletions t/run/fresh_perl.t
Expand Up @@ -194,8 +194,8 @@ BEGIN failed--compilation aborted at - line 1.
########
BEGIN { undef = 0 }
EXPECT
Modification of a read-only value attempted at - line 1.
BEGIN failed--compilation aborted at - line 1.
Can't modify undef operator in scalar assignment at - line 1, near "0 }"
BEGIN not safe after errors--compilation aborted at - line 1.
########
{
package foo;
Expand Down

0 comments on commit 2df5659

Please sign in to comment.