fix assert

This commit is contained in:
Folkert 2023-04-09 16:49:19 +02:00
parent cd95920d60
commit 9f8fb61281
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 5 additions and 2 deletions

View file

@ -554,7 +554,10 @@ impl<
let field_size = layout_interner.stack_size(*layout);
data_offset += field_size as i32;
}
debug_assert!(data_offset < base_offset + size as i32);
// check that the record completely contains the field
debug_assert!(data_offset <= base_offset + size as i32,);
let layout = field_layouts[index as usize];
let size = layout_interner.stack_size(layout);
self.allocation_map.insert(*sym, owned_data);

View file

@ -933,7 +933,7 @@ fn alignment_in_multi_tag_pattern_match() {
}
#[test]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm", feature = "gen-dev"))]
fn phantom_polymorphic() {
assert_evals_to!(
indoc!(