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

@@ -1,13 +1,21 @@
const fns = [_](fn(i32)i32) { a, b, c };
pub fn a(x: i32) i32 {return x + 0;}
pub fn b(x: i32) i32 {return x + 1;}
export fn c(x: i32) i32 {return x + 2;}
const fns = [_](fn (i32) i32){ a, b, c };
pub fn a(x: i32) i32 {
return x + 0;
}
pub fn b(x: i32) i32 {
return x + 1;
}
export fn c(x: i32) i32 {
return x + 2;
}
export fn entry() usize { return @sizeOf(@TypeOf(fns)); }
export fn entry() usize {
return @sizeOf(@TypeOf(fns));
}
// error
// backend=stage2
// target=native
//
// :1:37: error: expected type 'fn(i32) i32', found 'fn(i32) callconv(.C) i32'
// :1:37: note: calling convention 'C' cannot cast into calling convention 'Unspecified'
// :1:38: error: expected type 'fn(i32) i32', found 'fn(i32) callconv(.C) i32'
// :1:38: note: calling convention 'C' cannot cast into calling convention 'Unspecified'