Move unexpected params warning to solve

This commit is contained in:
Agus Zubiaga 2024-07-06 21:36:26 -03:00
parent 63e722f61d
commit 0cbb352a89
No known key found for this signature in database
18 changed files with 115 additions and 169 deletions

View file

@ -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)