mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
record, tag, alias errors
- duplicate fields and tags are reported - circular aliases are reported
This commit is contained in:
parent
0372b34e86
commit
f6af66f342
13 changed files with 679 additions and 55 deletions
|
@ -1,6 +1,6 @@
|
|||
use inlinable_string::InlinableString;
|
||||
use roc_collections::all::MutSet;
|
||||
use roc_module::ident::Ident;
|
||||
use roc_module::ident::{Ident, Lowercase, TagName};
|
||||
use roc_module::symbol::{ModuleId, Symbol};
|
||||
use roc_parse::operator::BinOp;
|
||||
use roc_parse::pattern::PatternType;
|
||||
|
@ -21,6 +21,27 @@ pub enum Problem {
|
|||
original_region: Region,
|
||||
shadow: Located<Ident>,
|
||||
},
|
||||
CyclicAlias(Symbol, Region, Vec<Symbol>),
|
||||
PhantomTypeArgument {
|
||||
alias: Symbol,
|
||||
variable_region: Region,
|
||||
variable_name: Lowercase,
|
||||
},
|
||||
DuplicateRecordFieldValue {
|
||||
field_name: Lowercase,
|
||||
record_region: Region,
|
||||
field_region: Region,
|
||||
},
|
||||
DuplicateRecordFieldType {
|
||||
field_name: Lowercase,
|
||||
record_region: Region,
|
||||
field_region: Region,
|
||||
},
|
||||
DuplicateTag {
|
||||
tag_name: TagName,
|
||||
tag_union_region: Region,
|
||||
tag_region: Region,
|
||||
},
|
||||
RuntimeError(RuntimeError),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue