From 12748fd1166109a9dc0edf13d4fda7029c545d8c 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 725cbeec..76c9a545 100644 --- a/src/aro/Type.zig +++ b/src/aro/Type.zig @@ -1056,7 +1056,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