Should use argsloc for the last argument for arg_append()

This commit is contained in:
Shugo Maeda 2022-12-05 15:09:19 +09:00
parent f6dad39544
commit 2649055c98
No known key found for this signature in database
GPG Key ID: 2DFE34085E97CE47

View File

@ -13278,8 +13278,8 @@ new_args_forward_call(struct parser_params *p, NODE *leading, const YYLTYPE *loc
NODE *rest = NEW_LVAR(idFWD_REST, loc);
NODE *kwrest = list_append(p, NEW_LIST(0, loc), NEW_LVAR(idFWD_KWREST, loc));
NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, loc), loc);
NODE *args = leading ? rest_arg_append(p, leading, rest, loc) : NEW_SPLAT(rest, loc);
args = arg_append(p, args, new_hash(p, kwrest, loc), loc);
NODE *args = leading ? rest_arg_append(p, leading, rest, argsloc) : NEW_SPLAT(rest, loc);
args = arg_append(p, args, new_hash(p, kwrest, loc), argsloc);
return arg_blk_pass(args, block);
}
#endif