mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Check suffixes of all pattern identifiers
This commit is contained in:
parent
a31a35100b
commit
e75b1cf7a0
7 changed files with 210 additions and 60 deletions
|
@ -284,7 +284,7 @@ pub fn constrain_expr(
|
|||
constrain_field(types, constraints, env, field_var, loc_field_expr);
|
||||
|
||||
let check_field_con =
|
||||
constraints.check_record_field_fx(label.suffix(), field_var, field.region);
|
||||
constraints.fx_record_field_suffix(label.suffix(), field_var, field.region);
|
||||
let field_con = constraints.and_constraint([field_con, check_field_con]);
|
||||
|
||||
field_vars.push(field_var);
|
||||
|
|
|
@ -276,6 +276,10 @@ pub fn constrain_pattern(
|
|||
.push(constraints.is_open_type(type_index));
|
||||
}
|
||||
|
||||
state
|
||||
.constraints
|
||||
.push(constraints.fx_pattern_suffix(*symbol, type_index, region));
|
||||
|
||||
state.headers.insert(
|
||||
*symbol,
|
||||
Loc {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue