mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 03:42:17 +00:00
pattern_presence expects type index
This commit is contained in:
parent
0990eda0cb
commit
0f0c02965a
2 changed files with 32 additions and 22 deletions
|
@ -322,14 +322,11 @@ impl Constraints {
|
|||
|
||||
pub fn pattern_presence(
|
||||
&mut self,
|
||||
typ: Type,
|
||||
expected: PExpected<Type>,
|
||||
type_index: TypeOrVar,
|
||||
expected_index: PExpectedTypeIndex,
|
||||
category: PatternCategory,
|
||||
region: Region,
|
||||
) -> Constraint {
|
||||
let type_index = self.push_type(typ);
|
||||
let expected_index =
|
||||
Index::push_new(&mut self.pattern_expectations, expected.map(Cell::new));
|
||||
let category_index = Index::push_new(&mut self.pattern_categories, category);
|
||||
|
||||
Constraint::PatternPresence(type_index, expected_index, category_index, region)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue