Fix errors

This commit is contained in:
Ayaz Hafiz 2023-10-22 09:22:38 -04:00
parent da421068f1
commit 703ef6608e
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 167 additions and 20 deletions

View file

@ -653,9 +653,11 @@ impl RuntimeError {
| RuntimeError::DegenerateBranch(region)
| RuntimeError::InvalidInterpolation(region)
| RuntimeError::InvalidHexadecimal(region)
| RuntimeError::MultipleRecordBuilders(region)
| RuntimeError::UnappliedRecordBuilder(region)
| RuntimeError::InvalidUnicodeCodePt(region) => *region,
RuntimeError::UnresolvedTypeVar | RuntimeError::ErroneousType => Region::zero(),
RuntimeError::LookupNotInScope(ident, _) => ident.region,
RuntimeError::LookupNotInScope { loc_name, .. } => loc_name.region,
RuntimeError::OpaqueNotDefined { usage, .. } => usage.region,
RuntimeError::OpaqueNotApplied(ident) => ident.region,
RuntimeError::CircularDef(cycle) => cycle[0].symbol_region,