This commit is contained in:
Anton-4 2024-04-15 19:36:52 +02:00
parent a7b843743d
commit dc96e194bd
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
3 changed files with 7 additions and 4 deletions

View file

@ -2161,13 +2161,13 @@ impl<'a> LowLevelCall<'a> {
// Empty record is always equal to empty record.
// There are no runtime arguments to check, so just emit true or false.
LayoutRepr::Struct(field_layouts) if field_layouts.is_empty() => {
LayoutRepr::Struct([]) => {
backend.code_builder.i32_const(!invert_result as i32);
}
// Void is always equal to void. This is the type for the contents of the empty list in `[] == []`
// This instruction will never execute, but we need an i32 for module validation
LayoutRepr::Union(UnionLayout::NonRecursive(tags)) if tags.is_empty() => {
LayoutRepr::Union(UnionLayout::NonRecursive([])) => {
backend.code_builder.i32_const(!invert_result as i32);
}