mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Coalesce signatures in destructure constraining
This commit is contained in:
parent
b8b0d4f028
commit
6c4722fe1c
1 changed files with 3 additions and 4 deletions
|
@ -1826,14 +1826,15 @@ fn constrain_destructure_def(
|
|||
resolutions_to_make: vec![],
|
||||
};
|
||||
|
||||
let signature_index = constraints.push_type(signature);
|
||||
|
||||
let annotation_expected = FromAnnotation(
|
||||
loc_pattern.clone(),
|
||||
arity,
|
||||
AnnotationSource::TypedBody {
|
||||
region: annotation.region,
|
||||
},
|
||||
// TODO coalesce with other signatures
|
||||
constraints.push_type(signature.clone()),
|
||||
signature_index,
|
||||
);
|
||||
|
||||
// This will fill in inference variables in the `signature` as well, so that we can
|
||||
|
@ -1847,8 +1848,6 @@ fn constrain_destructure_def(
|
|||
annotation_expected,
|
||||
);
|
||||
|
||||
let signature_index = constraints.push_type(signature);
|
||||
|
||||
let cons = [
|
||||
ret_constraint,
|
||||
// Store type into AST vars. We use Store so errors aren't reported twice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue