all: zig fmt and rename "@XToY" to "@YFromX"

Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
Eric Joldasov
2023-06-15 13:14:16 +06:00
committed by Andrew Kelley
parent a6c8ee5231
commit 50339f595a
665 changed files with 6204 additions and 5889 deletions

View File

@@ -4,11 +4,11 @@ export fn foo() void {
}
export fn bar() void {
var a: f32 = 2;
_ = @floatToInt(f32, a);
_ = @intFromFloat(f32, a);
}
export fn baz() void {
var a: f32 = 2;
_ = @intToFloat(f32, a);
_ = @floatFromInt(f32, a);
}
export fn qux() void {
var a: u32 = 2;
@@ -20,6 +20,6 @@ export fn qux() void {
// target=native
//
// :3:36: error: unable to cast runtime value to 'comptime_float'
// :7:21: error: expected integer type, found 'f32'
// :11:26: error: expected integer type, found 'f32'
// :7:23: error: expected integer type, found 'f32'
// :11:28: error: expected integer type, found 'f32'
// :15:25: error: expected float type, found 'u32'