aboutsummaryrefslogtreecommitdiff
path: root/src/AstGen.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-11-24 14:47:33 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-11-24 14:47:33 -0700
commitc42763f8cc9223fc43ac3478a5f15d4bd9f438e4 (patch)
tree8dc9c3e3cf9f6e5ebb4308da37142c70df947fb4 /src/AstGen.zig
parent57e1f6a89f044e731fe60ce15e98b496dcbaa74f (diff)
downloadzig-c42763f8cc9223fc43ac3478a5f15d4bd9f438e4.tar.gz
zig-c42763f8cc9223fc43ac3478a5f15d4bd9f438e4.zip
AstGen: use reachableExpr for return operand
Related: #9630
Diffstat (limited to 'src/AstGen.zig')
-rw-r--r--src/AstGen.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig
index 7132dc07ef..ae66cae662 100644
--- a/src/AstGen.zig
+++ b/src/AstGen.zig
@@ -5963,7 +5963,7 @@ fn ret(gz: *GenZir, scope: *Scope, node: Ast.Node.Index) InnerError!Zir.Inst.Ref
} else .{
.ty = try gz.addNodeExtended(.ret_type, node),
};
- const operand = try expr(gz, scope, rl, operand_node);
+ const operand = try reachableExpr(gz, scope, rl, operand_node, node);
switch (nodeMayEvalToError(tree, operand_node)) {
.never => {