mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +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
|
@ -71,6 +71,15 @@ impl<T> Expected<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_annotation_region(&self) -> Option<Region> {
|
||||
match self {
|
||||
Expected::FromAnnotation(_, _, AnnotationSource::TypedBody { region }, _) => {
|
||||
Some(*region)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn replace<U>(self, new: U) -> Expected<U> {
|
||||
match self {
|
||||
Expected::NoExpectation(_val) => Expected::NoExpectation(new),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue