diff options
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 3793418972..8b2b58fea7 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -2945,7 +2945,7 @@ static IrInstruction *ir_gen_return(IrBuilder *irb, Scope *scope, AstNode *node, return irb->codegen->invalid_instruction; } - Scope *outer_scope = fn_entry->child_scope; + Scope *outer_scope = irb->exec->begin_scope; AstNode *expr_node = node->data.return_expr.expr; switch (node->data.return_expr.kind) { |
