mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
Sema: add missed logic to checkPtrAttributes
It wasn't checking bit pointer data.
This commit is contained in:
@@ -14,6 +14,7 @@ fn bar(x: *u32) void {
|
||||
|
||||
// error
|
||||
//
|
||||
// :8:9: error: expected type '*u32', found '*align(1) u32'
|
||||
// :8:9: note: pointer alignment '1' cannot cast into pointer alignment '4'
|
||||
// :8:9: error: expected type '*u32', found '*align(8:8:8) u32'
|
||||
// :8:9: note: pointer host size '8' cannot cast into pointer host size '0'
|
||||
// :8:9: note: pointer bit offset '8' cannot cast into pointer bit offset '0'
|
||||
// :11:11: note: parameter type declared here
|
||||
|
||||
@@ -15,5 +15,6 @@ fn bar(x: []u32) void {
|
||||
|
||||
// error
|
||||
//
|
||||
// :9:22: error: expected type '*[1]u32', found '*align(1) u32'
|
||||
// :9:22: note: pointer alignment '1' cannot cast into pointer alignment '4'
|
||||
// :9:22: error: expected type '*[1]u32', found '*align(8:8:8) u32'
|
||||
// :9:22: note: pointer host size '8' cannot cast into pointer host size '0'
|
||||
// :9:22: note: pointer bit offset '8' cannot cast into pointer bit offset '0'
|
||||
|
||||
Reference in New Issue
Block a user