mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Coalesce signatures in destructure constraining
This commit is contained in:
parent
b8b0d4f028
commit
6c4722fe1c
@ -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…
Reference in New Issue
Block a user