Sema: implement missing stage1 errors

This commit is contained in:
Veikka Tuominen
2022-12-11 19:02:18 +02:00
parent 423d7a74a4
commit 927d20b46b
42 changed files with 421 additions and 255 deletions

View File

@@ -0,0 +1,13 @@
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)); }
// 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'