push value for NULL AST when value is required; fix #3110

parent ec35e549
......@@ -1179,7 +1179,13 @@ codegen(codegen_scope *s, node *tree, int val)
{
int nt;
if (!tree) return;
if (!tree) {
if (val) {
genop(s, MKOP_A(OP_LOADNIL, cursp()));
push();
}
return;
}
if (s->irep && s->filename_index != tree->filename_index) {
s->irep->filename = mrb_parser_get_filename(s->parser, s->filename_index);
......
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