Initial implementation of tuples in type checking

This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
This commit is contained in:
Joshua Warner 2022-12-25 19:26:32 -08:00
parent d57cb50425
commit de828416bf
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
32 changed files with 1785 additions and 112 deletions

View file

@ -821,6 +821,9 @@ impl Layout {
Ok(Layout::Struct(slice))
}
FlatType::Tuple(_elems, _ext) => {
todo!();
}
FlatType::TagUnion(union_tags, ext) => {
debug_assert!(ext_var_is_empty_tag_union(subs, *ext));
@ -861,7 +864,7 @@ impl Layout {
Ok(Layout::UnionRecursive(slices))
}
FlatType::EmptyRecord => Ok(Layout::UNIT),
FlatType::EmptyRecord | FlatType::EmptyTuple => Ok(Layout::UNIT),
FlatType::EmptyTagUnion => Ok(Layout::VOID),
}
}