mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Handle multi pattern unbound list rest variables
This commit is contained in:
parent
03eadc2e0f
commit
f4551978ce
4 changed files with 35 additions and 5 deletions
|
@ -141,7 +141,7 @@ fn headers_from_annotation_help(
|
|||
constraints.push_type(types, typ)
|
||||
};
|
||||
let typ = Loc::at(annotation.region, annotation_index);
|
||||
headers.insert(rest, typ);
|
||||
headers.insert(rest.value, typ);
|
||||
|
||||
false
|
||||
} else {
|
||||
|
@ -735,7 +735,7 @@ pub fn constrain_pattern(
|
|||
|
||||
if let Some((_, Some(rest))) = opt_rest {
|
||||
state.headers.insert(
|
||||
*rest,
|
||||
rest.value,
|
||||
Loc {
|
||||
region,
|
||||
value: *constraints[expected].get_type_ref(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue