mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
make record variable names clearer
This commit is contained in:
parent
1a8f380033
commit
e62ddc9ef5
5 changed files with 29 additions and 17 deletions
|
@ -90,7 +90,7 @@ pub fn constrain_expr(
|
|||
),
|
||||
Float(var, _) => float_literal(*var, expected, region),
|
||||
EmptyRecord => constrain_empty_record(region, expected),
|
||||
Expr::Record(stored_var, fields) => {
|
||||
Expr::Record { record_var, fields } => {
|
||||
if fields.is_empty() {
|
||||
constrain_empty_record(region, expected)
|
||||
} else {
|
||||
|
@ -125,9 +125,9 @@ pub fn constrain_expr(
|
|||
constraints.push(record_con);
|
||||
|
||||
// variable to store in the AST
|
||||
let stored_con = Eq(Type::Variable(*stored_var), expected, region);
|
||||
let stored_con = Eq(Type::Variable(*record_var), expected, region);
|
||||
|
||||
field_vars.push(*stored_var);
|
||||
field_vars.push(*record_var);
|
||||
constraints.push(stored_con);
|
||||
|
||||
exists(field_vars, And(constraints))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue