mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +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
|
@ -36,6 +36,7 @@ pub enum TypeError {
|
|||
},
|
||||
IngestedFileBadUtf8(Box<PathBuf>, Utf8Error),
|
||||
IngestedFileUnsupportedType(Box<PathBuf>, ErrorType),
|
||||
UnexpectedImportParams(Region, ModuleId),
|
||||
MissingImportParams(Region, ModuleId, ErrorType),
|
||||
ImportParamsMismatch(Region, ModuleId, ErrorType, ErrorType),
|
||||
}
|
||||
|
@ -57,6 +58,7 @@ impl TypeError {
|
|||
TypeError::Exhaustive(exhtv) => exhtv.severity(),
|
||||
TypeError::StructuralSpecialization { .. } => RuntimeError,
|
||||
TypeError::WrongSpecialization { .. } => RuntimeError,
|
||||
TypeError::UnexpectedImportParams(..) => Warning,
|
||||
TypeError::MissingImportParams(..) => RuntimeError,
|
||||
TypeError::ImportParamsMismatch(..) => RuntimeError,
|
||||
TypeError::IngestedFileBadUtf8(..) => Fatal,
|
||||
|
@ -74,6 +76,7 @@ impl TypeError {
|
|||
| TypeError::StructuralSpecialization { region, .. }
|
||||
| TypeError::WrongSpecialization { region, .. }
|
||||
| TypeError::BadPatternMissingAbility(region, ..)
|
||||
| TypeError::UnexpectedImportParams(region, ..)
|
||||
| TypeError::MissingImportParams(region, ..)
|
||||
| TypeError::ImportParamsMismatch(region, ..) => Some(*region),
|
||||
TypeError::UnfulfilledAbility(ab, ..) => ab.region(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue