all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
committed by
Andrew Kelley
parent
a6c8ee5231
commit
50339f595a
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user