mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Unsuffixed effectul function warning
This commit is contained in:
parent
75856ae804
commit
1da8af390b
5 changed files with 115 additions and 4 deletions
|
@ -40,6 +40,7 @@ pub enum TypeError {
|
|||
MissingModuleParams(Region, ModuleId, ErrorType),
|
||||
ModuleParamsMismatch(Region, ModuleId, ErrorType, ErrorType),
|
||||
PureStmt(Region),
|
||||
UnsuffixedEffectfulFunction(Region, Symbol),
|
||||
}
|
||||
|
||||
impl TypeError {
|
||||
|
@ -65,6 +66,7 @@ impl TypeError {
|
|||
TypeError::IngestedFileBadUtf8(..) => Fatal,
|
||||
TypeError::IngestedFileUnsupportedType(..) => Fatal,
|
||||
TypeError::PureStmt(..) => Warning,
|
||||
TypeError::UnsuffixedEffectfulFunction(_, _) => Warning,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +83,8 @@ impl TypeError {
|
|||
| TypeError::UnexpectedModuleParams(region, ..)
|
||||
| TypeError::MissingModuleParams(region, ..)
|
||||
| TypeError::ModuleParamsMismatch(region, ..)
|
||||
| TypeError::PureStmt(region) => Some(*region),
|
||||
| TypeError::PureStmt(region)
|
||||
| TypeError::UnsuffixedEffectfulFunction(region, _) => Some(*region),
|
||||
TypeError::UnfulfilledAbility(ab, ..) => ab.region(),
|
||||
TypeError::Exhaustive(e) => Some(e.region()),
|
||||
TypeError::CircularDef(c) => c.first().map(|ce| ce.symbol_region),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue