mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
stage2: fix function calls always having void return type
This commit is contained in:
parent
1c2e65fe1d
commit
3e0a46281c
@ -2828,8 +2828,10 @@ fn analyzeInstCall(self: *Module, scope: *Scope, inst: *zir.Inst.Call) InnerErro
|
||||
casted_args[i] = try self.coerce(scope, fn_param_types[i], uncasted_arg);
|
||||
}
|
||||
|
||||
const ret_type = func.ty.fnReturnType();
|
||||
|
||||
const b = try self.requireRuntimeBlock(scope, inst.base.src);
|
||||
return self.addCall(b, inst.base.src, Type.initTag(.void), func, casted_args);
|
||||
return self.addCall(b, inst.base.src, ret_type, func, casted_args);
|
||||
}
|
||||
|
||||
fn analyzeInstFn(self: *Module, scope: *Scope, fn_inst: *zir.Inst.Fn) InnerError!*Inst {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user