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 Dec 15, 2023
1 parent 14c42cc commit e498fdb
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 @@ -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
Expand Down

0 comments on commit e498fdb

Please sign in to comment.