mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
equal_types_var requires a type index
This commit is contained in:
parent
91eb9aaea4
commit
cca5f53e98
3 changed files with 93 additions and 69 deletions
|
@ -269,12 +269,11 @@ impl Constraints {
|
|||
pub fn equal_types_var(
|
||||
&mut self,
|
||||
var: Variable,
|
||||
expected: Expected<Type>,
|
||||
expected_index: ExpectedTypeIndex,
|
||||
category: Category,
|
||||
region: Region,
|
||||
) -> Constraint {
|
||||
let type_index = Self::push_type_variable(var);
|
||||
let expected_index = Index::push_new(&mut self.expectations, expected.map(Cell::new));
|
||||
let category_index = Self::push_category(self, category);
|
||||
|
||||
Constraint::Eq(Eq(type_index, expected_index, category_index, region))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue