From 586bb07c4d0b1307a2e658abf578467dff8161b6 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sat, 18 Aug 2012 18:00:20 +0200 Subject: [PATCH] Use the current context, not the one from a NULL value... for ast_return --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index a901c40..5fb8765 100644 --- a/parser.c +++ b/parser.c @@ -1618,7 +1618,7 @@ static bool parser_parse_statement(parser_t *parser, ast_block *block, ast_expre if (expected->expression.next->expression.vtype != TYPE_VOID) { parseerror(parser, "return without value"); } - ret = ast_return_new(exp->expression.node.context, NULL); + ret = ast_return_new(parser_ctx(parser), NULL); } *out = (ast_expression*)ret; return true; -- 2.39.2