Skip to content

Commit

Permalink
Fix assertion failure with ($_[0])->{$_}
Browse files Browse the repository at this point in the history
Type::Tiny was triggering this.  The Type::Tiny failure was mention in
ticket #123213.
  • Loading branch information
Father Chrysostomos committed Dec 9, 2014
1 parent c290e18 commit 1553b1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion op.c
Expand Up @@ -12517,7 +12517,8 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
|| (o->op_private & OPpDEREF) == OPpDEREF_HV);

if (is_deref) {
assert(!(o->op_flags & ~(OPf_WANT|OPf_KIDS|OPf_MOD)));
assert(!(o->op_flags &
~(OPf_WANT|OPf_KIDS|OPf_MOD|OPf_PARENS)));
assert(!(o->op_private & ~(OPpARG2_MASK|OPpDEREF)));

ok = o->op_flags == (OPf_WANT_SCALAR|OPf_KIDS|OPf_MOD)
Expand Down
5 changes: 4 additions & 1 deletion t/comp/parser.t
Expand Up @@ -8,7 +8,7 @@ BEGIN {
chdir 't' if -d 't';
}

print "1..171\n";
print "1..172\n";

sub failed {
my ($got, $expected, $name) = @_;
Expand Down Expand Up @@ -509,6 +509,9 @@ eval '#line 1 maggapom
is $@, "Illegal division by zero at maggapom line 2.\n",
'else {foo} line number (no space after {) [perl #122695]';
# parentheses needed for this to fail an assertion in S_maybe_multideref
is +(${[{a=>214}]}[0])->{a}, 214, '($array[...])->{...}';
# Add new tests HERE (above this line)
# bug #74022: Loop on characters in \p{OtherIDContinue}
Expand Down

0 comments on commit 1553b1d

Please sign in to comment.