diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-31 12:50:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-31 12:52:27 +0900 |
| commit | b04506cdcc4e389c9e157cefe6c3ad9e6afab7ca (patch) | |
| tree | a3d9eabba65e8d973ca94039711f495bde713659 /mrbgems/mruby-compiler | |
| parent | 23ca1dcb4e8c388e18679d82c7a216b62c248c73 (diff) | |
| download | mruby-b04506cdcc4e389c9e157cefe6c3ad9e6afab7ca.tar.gz mruby-b04506cdcc4e389c9e157cefe6c3ad9e6afab7ca.zip | |
Should not check non-node value to `void_expr_error`; fix #4203
This is also a reason for #4192 as well.
Diffstat (limited to 'mrbgems/mruby-compiler')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 0e67e5881..6a2defa8f 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -795,6 +795,13 @@ new_masgn(parser_state *p, node *a, node *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) */ static node* new_op_asgn(parser_state *p, node *a, mrb_sym op, node *b) @@ -3302,7 +3309,7 @@ f_arg_item : f_norm_arg } f_margs rparen { - $$ = new_masgn(p, $3, p->locals->car); + $$ = new_masgn_param(p, $3, p->locals->car); local_resume(p, $<nd>2); local_add_f(p, 0); } |
