stage2: fix returning structs byval from functions

This commit is contained in:
Andrew Kelley
2021-10-07 17:42:17 -07:00
parent a0c44e806b
commit 75cecef63c
3 changed files with 16 additions and 16 deletions

View File

@@ -6473,7 +6473,7 @@ fn ret(gz: *GenZir, scope: *Scope, node: Ast.Node.Index) InnerError!Zir.Inst.Ref
.never => {
// Returning a value that cannot be an error; skip error defers.
try genDefers(gz, defer_outer, scope, .normal_only);
_ = try gz.addUnNode(.ret_node, operand, node);
try gz.addRet(rl, operand, node);
return Zir.Inst.Ref.unreachable_value;
},
.always => {