mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Support basic diagnostic reporting
This commit is contained in:
parent
c50925240d
commit
9d365a8a57
11 changed files with 572 additions and 3 deletions
|
@ -160,6 +160,13 @@ impl Error {
|
|||
Error::Unmatchable { .. } => Warning,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn region(&self) -> Region {
|
||||
match self {
|
||||
Error::Incomplete(region, _, _) => *region,
|
||||
Error::Redundant { branch_region, .. } => *branch_region,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue