Skip to content

Commit

Permalink
Type: invalid types are not alignable
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaas committed Feb 13, 2024
1 parent d11f9e6 commit 12748fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aro/Type.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12748fd

Please sign in to comment.