Should not check non-node value to `void_expr_error`; fix #4203

This is also a reason for #4192 as well.
parent 23ca1dcb
...@@ -795,6 +795,13 @@ new_masgn(parser_state *p, node *a, node *b) ...@@ -795,6 +795,13 @@ new_masgn(parser_state *p, node *a, node *b)
return cons((node*)NODE_MASGN, cons(a, b)); return cons((node*)NODE_MASGN, cons(a, b));
} }
/* (:masgn mlhs mrhs) no check */
static node*
new_masgn_param(parser_state *p, node *a, node *b)
{
return cons((node*)NODE_MASGN, cons(a, b));
}
/* (:asgn lhs rhs) */ /* (:asgn lhs rhs) */
static node* static node*
new_op_asgn(parser_state *p, node *a, mrb_sym op, node *b) new_op_asgn(parser_state *p, node *a, mrb_sym op, node *b)
...@@ -3302,7 +3309,7 @@ f_arg_item : f_norm_arg ...@@ -3302,7 +3309,7 @@ f_arg_item : f_norm_arg
} }
f_margs rparen f_margs rparen
{ {
$$ = new_masgn(p, $3, p->locals->car); $$ = new_masgn_param(p, $3, p->locals->car);
local_resume(p, $<nd>2); local_resume(p, $<nd>2);
local_add_f(p, 0); local_add_f(p, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment