mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
first draft about invalid optional fields in records
This commit is contained in:
parent
2fb803cdd0
commit
aaff5a5dce
3 changed files with 70 additions and 46 deletions
|
@ -40,6 +40,8 @@ pub enum Problem {
|
|||
field_region: Region,
|
||||
replaced_region: Region,
|
||||
},
|
||||
InvalidOptionalRecord,
|
||||
|
||||
DuplicateTag {
|
||||
tag_name: TagName,
|
||||
tag_union_region: Region,
|
||||
|
@ -101,6 +103,7 @@ pub enum RuntimeError {
|
|||
original_region: Region,
|
||||
shadow: Located<Ident>,
|
||||
},
|
||||
InvalidOptionalRecord,
|
||||
// Example: (5 = 1 + 2) is an unsupported pattern in an assignment; Int patterns aren't allowed in assignments!
|
||||
UnsupportedPattern(Region),
|
||||
// Example: when 1 is 1.X -> 32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue