Sema: better source location for function call args

This commit is contained in:
Veikka Tuominen
2022-07-20 00:02:20 +03:00
committed by Andrew Kelley
parent 79ef0cdf30
commit 821e4063f9
18 changed files with 301 additions and 153 deletions

View File

@@ -0,0 +1,20 @@
const Foo = packed struct {
a: u8,
b: u32,
};
export fn entry() void {
var foo = Foo { .a = 1, .b = 10 };
bar(&foo.b);
}
fn bar(x: *u32) void {
x.* += 1;
}
// error
// backend=stage2
// target=native
//
// :8:9: error: expected type '*u32', found '*align(1) u32'
// :8:9: note: pointer alignment '1' cannot cast into pointer alignment '4'