diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-01-29 21:57:49 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-01-29 21:57:49 -0500 |
| commit | 3caf6bacdcc797167e5db1b5545aad8e464cf311 (patch) | |
| tree | 3b3d61eca71716e9d9a7dec2eaef25e2fd4153f3 /src/ir.cpp | |
| parent | c75e58ffe6905c6a7d4e9f082726ea2cdcec514e (diff) | |
| download | zig-3caf6bacdcc797167e5db1b5545aad8e464cf311.tar.gz zig-3caf6bacdcc797167e5db1b5545aad8e464cf311.zip | |
fix sometimes using wrong outer scope for generating defers
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) { |
