use EitherIndex<Type, Variable> to halve number of types stored

This commit is contained in:
Folkert 2022-03-13 01:46:49 +01:00
parent da03b0c2b3
commit b3d9f9c2de
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 69 additions and 34 deletions

View file

@ -1248,14 +1248,7 @@ fn constrain_empty_record(
region: Region,
expected: Expected<Type>,
) -> Constraint {
let expected_index = constraints.push_expected_type(expected);
Constraint::Eq(
Constraints::EMPTY_RECORD,
expected_index,
Constraints::CATEGORY_RECORD,
region,
)
constraints.equal_types(Type::EmptyRec, expected, Category::Record, region)
}
/// Constrain top-level module declarations