AstGen: use RLS to infer the first argument of @fieldParentPtr

This commit is contained in:
Jacob Young
2024-03-19 11:55:15 +01:00
parent e409afb79b
commit 17673dcd6e
9 changed files with 126 additions and 83 deletions

View File

@@ -8,7 +8,7 @@ export fn entry() u32 {
// backend=stage2
// target=native
//
// :3:23: error: cast increases pointer alignment
// :3:23: error: @ptrCast increases pointer alignment
// :3:32: note: '*u8' has alignment '1'
// :3:23: note: '*u32' has alignment '4'
// :3:23: note: use @alignCast to assert pointer alignment

View File

@@ -16,7 +16,7 @@ export fn c() void {
//
// :3:45: error: null pointer casted to type '*const u32'
// :6:34: error: expected pointer type, found 'comptime_int'
// :9:22: error: cast increases pointer alignment
// :9:22: error: @ptrCast increases pointer alignment
// :9:71: note: '?*const u8' has alignment '1'
// :9:22: note: '?*f32' has alignment '4'
// :9:22: note: use @alignCast to assert pointer alignment

View File

@@ -8,5 +8,5 @@ export fn entry() void {
// backend=stage2
// target=native
//
// :3:21: error: cast discards const qualifier
// :3:21: error: @ptrCast discards const qualifier
// :3:21: note: use @constCast to discard const qualifier