mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Fix can panic with unbound type variables
This commit is contained in:
parent
9b13b19d08
commit
f4698e1517
4 changed files with 39 additions and 7 deletions
|
@ -256,6 +256,7 @@ pub enum Problem {
|
|||
UnsuffixedEffectfulRecordField(Region),
|
||||
SuffixedPureRecordField(Region),
|
||||
EmptyTupleType(Region),
|
||||
UnboundTypeVarsInAs(Region),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
|
@ -345,6 +346,7 @@ impl Problem {
|
|||
Warning
|
||||
}
|
||||
Problem::EmptyTupleType(_) => Warning,
|
||||
Problem::UnboundTypeVarsInAs(_) => Warning,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -511,6 +513,7 @@ impl Problem {
|
|||
| Problem::ReturnOutsideOfFunction { region, .. }
|
||||
| Problem::StatementsAfterReturn { region }
|
||||
| Problem::ReturnAtEndOfFunction { region }
|
||||
| Problem::UnboundTypeVarsInAs(region)
|
||||
| Problem::UnsuffixedEffectfulRecordField(region)
|
||||
| Problem::SuffixedPureRecordField(region) => Some(*region),
|
||||
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue