mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Report unsuffixed record literal field with effectful function
This commit is contained in:
parent
ea35094b28
commit
215de707fa
7 changed files with 121 additions and 21 deletions
|
@ -283,6 +283,10 @@ pub fn constrain_expr(
|
|||
let (field_type, field_con) =
|
||||
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);
|
||||
let field_con = constraints.and_constraint([field_con, check_field_con]);
|
||||
|
||||
field_vars.push(field_var);
|
||||
field_types.insert(label.clone(), RecordField::Required(field_type));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue