Zig Version
0.16.0
Steps to Reproduce, Observed Behavior, and Expected Behavior
using @intFromFloat instead of @trunc fixes the compile error, similarily, removing the trunc call entirely also fixes the issue.
side note i know that @trunc call is pointless with the rounding functions.
pubfnmain()!void{_=foo(1,2);}fnfoo(f1:f32,f2:f32)i32{// error happens with @round, @ceil, and @floor.constinteger_cast:i32=@trunc(@floor(f1+f2));returninteger_cast;}
### Zig Version
0.16.0
### Steps to Reproduce, Observed Behavior, and Expected Behavior
using @intFromFloat instead of @trunc fixes the compile error, similarily, removing the trunc call entirely also fixes the issue.
side note i know that @trunc call is pointless with the rounding functions.
```zig
pub fn main() !void {
_ = foo(1, 2);
}
fn foo(f1: f32, f2: f32) i32 {
// error happens with @round, @ceil, and @floor.
const integer_cast: i32 = @trunc(@floor(f1 + f2));
return integer_cast;
}
```