mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Constrain + solve crash
This commit is contained in:
parent
9dc489c2b0
commit
e2b30e5301
13 changed files with 194 additions and 60 deletions
|
@ -195,6 +195,12 @@ pub enum Problem {
|
|||
type_got: u8,
|
||||
alias_kind: AliasKind,
|
||||
},
|
||||
UnappliedCrash {
|
||||
region: Region,
|
||||
},
|
||||
OverAppliedCrash {
|
||||
region: Region,
|
||||
},
|
||||
}
|
||||
|
||||
impl Problem {
|
||||
|
@ -325,7 +331,9 @@ impl Problem {
|
|||
}
|
||||
| Problem::MultipleListRestPattern { region }
|
||||
| Problem::BadTypeArguments { region, .. }
|
||||
| Problem::UnnecessaryOutputWildcard { region } => Some(*region),
|
||||
| Problem::UnnecessaryOutputWildcard { region }
|
||||
| Problem::OverAppliedCrash { region }
|
||||
| Problem::UnappliedCrash { region } => Some(*region),
|
||||
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
|
||||
| Problem::BadRecursion(cycle_entries) => {
|
||||
cycle_entries.first().map(|entry| entry.expr_region)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue