mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
WIP
This commit is contained in:
parent
743030fc99
commit
8a566dc339
260 changed files with 6344 additions and 2958 deletions
|
@ -251,6 +251,7 @@ pub enum Problem {
|
|||
ReturnAtEndOfFunction {
|
||||
region: Region,
|
||||
},
|
||||
StmtAfterExpr(Region),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
|
@ -335,6 +336,7 @@ impl Problem {
|
|||
Problem::ReturnOutsideOfFunction { .. } => Warning,
|
||||
Problem::StatementsAfterReturn { .. } => Warning,
|
||||
Problem::ReturnAtEndOfFunction { .. } => Warning,
|
||||
Problem::StmtAfterExpr(_) => Fatal,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,8 +482,8 @@ impl Problem {
|
|||
}
|
||||
| Problem::NotAnAbility(region)
|
||||
| Problem::ImplementsNonRequired { region, .. }
|
||||
| Problem::DoesNotImplementAbility { region, .. }
|
||||
| Problem::NoIdentifiersIntroduced(region)
|
||||
| Problem::DoesNotImplementAbility { region, .. }
|
||||
| Problem::OverloadedSpecialization {
|
||||
overload: region, ..
|
||||
}
|
||||
|
@ -505,6 +507,7 @@ impl Problem {
|
|||
| Problem::BadRecursion(cycle_entries) => {
|
||||
cycle_entries.first().map(|entry| entry.expr_region)
|
||||
}
|
||||
Problem::StmtAfterExpr(region) => Some(*region),
|
||||
Problem::RuntimeError(RuntimeError::UnresolvedTypeVar)
|
||||
| Problem::RuntimeError(RuntimeError::ErroneousType)
|
||||
| Problem::RuntimeError(RuntimeError::NonExhaustivePattern)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue