mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 00:57:24 +00:00
Move unexpected params warning to solve
This commit is contained in:
parent
63e722f61d
commit
0cbb352a89
18 changed files with 115 additions and 169 deletions
|
@ -236,10 +236,6 @@ pub enum Problem {
|
|||
one_occurrence: Region,
|
||||
kind: AliasKind,
|
||||
},
|
||||
UnexpectedParams {
|
||||
module_id: ModuleId,
|
||||
region: Region,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
|
@ -319,7 +315,6 @@ impl Problem {
|
|||
Problem::OverAppliedCrash { .. } => RuntimeError,
|
||||
Problem::DefsOnlyUsedInRecursion(_, _) => Warning,
|
||||
Problem::FileProblem { .. } => Fatal,
|
||||
Problem::UnexpectedParams { .. } => Warning,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -476,8 +471,7 @@ impl Problem {
|
|||
| Problem::UnnecessaryOutputWildcard { region }
|
||||
| Problem::OverAppliedCrash { region }
|
||||
| Problem::UnappliedCrash { region }
|
||||
| Problem::DefsOnlyUsedInRecursion(_, region)
|
||||
| Problem::UnexpectedParams { region, .. } => Some(*region),
|
||||
| Problem::DefsOnlyUsedInRecursion(_, 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