mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
fix implementation of UnionLayout::tag_id_offset
This commit is contained in:
parent
ab3501a2a3
commit
f85d3243e9
1 changed files with 7 additions and 1 deletions
|
@ -630,7 +630,13 @@ impl<'a> UnionLayout<'a> {
|
|||
}
|
||||
|
||||
pub fn tag_id_offset(&self, target_info: TargetInfo) -> Option<u32> {
|
||||
let data_width = self.data_size_without_tag_id(target_info)?;
|
||||
use UnionLayout::*;
|
||||
|
||||
if let NonNullableUnwrapped(_) | NullableUnwrapped { .. } = self {
|
||||
return None;
|
||||
}
|
||||
|
||||
let data_width = self.data_size_and_alignment_help_match(None, target_info).0;
|
||||
|
||||
// current, broken logic
|
||||
if data_width > 8 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue