mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
use EitherIndex<Type, Variable> to halve number of types stored
This commit is contained in:
parent
da03b0c2b3
commit
b3d9f9c2de
3 changed files with 69 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue