From f4f9b37aeb38e06927ef49961f944d0cb7e93bac Mon Sep 17 00:00:00 2001 From: Evan Haas Date: Thu, 14 Dec 2023 00:26:56 -0800 Subject: [PATCH] Type: invalid types are not alignable --- src/aro/Type.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aro/Type.zig b/src/aro/Type.zig index af59c60b..977081f0 100644 --- a/src/aro/Type.zig +++ b/src/aro/Type.zig @@ -1055,7 +1055,7 @@ pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 { } pub fn alignable(ty: Type) bool { - return ty.isArray() or !ty.hasIncompleteSize() or ty.is(.void); + return (ty.isArray() or !ty.hasIncompleteSize() or ty.is(.void)) and !ty.is(.invalid); } /// Get the alignment of a type