first draft about invalid optional fields in records

This commit is contained in:
Sébastien Besnier 2020-11-03 21:28:50 +01:00
parent 2fb803cdd0
commit aaff5a5dce
3 changed files with 70 additions and 46 deletions

View file

@ -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