Sema: fix fn pointer align disagrees with fn align error
Check the specified function alignment rather than the effective function alignment.
This commit is contained in:
@@ -16,10 +16,13 @@ comptime {
|
||||
var a: *align(2) fn () void = undefined;
|
||||
_ = a;
|
||||
}
|
||||
comptime {
|
||||
var a: *align(1) fn () align(2) void = undefined;
|
||||
_ = a;
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
// target=native
|
||||
//
|
||||
// :2:19: error: function pointer alignment disagrees with function alignment
|
||||
// :16:19: error: function pointer alignment disagrees with function alignment
|
||||
// :20:19: error: function pointer alignment disagrees with function alignment
|
||||
|
||||
Reference in New Issue
Block a user