mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Inline BadType::BadTypeArguments in canonicalization errors
This commit is contained in:
parent
98464984dd
commit
8dfc9c0367
3 changed files with 51 additions and 54 deletions
|
@ -188,7 +188,13 @@ pub enum Problem {
|
|||
MultipleListRestPattern {
|
||||
region: Region,
|
||||
},
|
||||
BadType(roc_types::types::Problem),
|
||||
BadTypeArguments {
|
||||
symbol: Symbol,
|
||||
region: Region,
|
||||
alias_needs: u8,
|
||||
type_got: u8,
|
||||
alias_kind: AliasKind,
|
||||
},
|
||||
}
|
||||
|
||||
impl Problem {
|
||||
|
@ -318,6 +324,7 @@ impl Problem {
|
|||
..
|
||||
}
|
||||
| Problem::MultipleListRestPattern { region }
|
||||
| Problem::BadTypeArguments { region, .. }
|
||||
| Problem::UnnecessaryOutputWildcard { region } => Some(*region),
|
||||
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
|
||||
| Problem::BadRecursion(cycle_entries) => {
|
||||
|
@ -331,7 +338,6 @@ impl Problem {
|
|||
| Problem::RuntimeError(RuntimeError::ExposedButNotDefined(_))
|
||||
| Problem::RuntimeError(RuntimeError::NoImplementationNamed { .. })
|
||||
| Problem::ExposedButNotDefined(_) => None,
|
||||
Problem::BadType(..) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue