mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-22 11:32:27 +00:00
Disallow typing optional fields when required fields are annotated
Closes #4313
This commit is contained in:
parent
62c9a2a8b6
commit
05e8e6de6f
13 changed files with 133 additions and 85 deletions
|
@ -1209,7 +1209,7 @@ fn can_assigned_fields<'a>(
|
|||
);
|
||||
|
||||
let label = Lowercase::from(field_name.value);
|
||||
field_types.insert(label.clone(), Required(field_type));
|
||||
field_types.insert(label.clone(), RigidRequired(field_type));
|
||||
|
||||
break 'inner label;
|
||||
}
|
||||
|
@ -1246,7 +1246,7 @@ fn can_assigned_fields<'a>(
|
|||
}
|
||||
};
|
||||
|
||||
field_types.insert(field_name.clone(), Required(field_type));
|
||||
field_types.insert(field_name.clone(), RigidRequired(field_type));
|
||||
|
||||
break 'inner field_name;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue