mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-13 07:16:18 +00:00
Suffixed pure function warning
This commit is contained in:
parent
1da8af390b
commit
d22b2a79f5
5 changed files with 59 additions and 3 deletions
|
@ -1543,7 +1543,17 @@ fn check_symbol_suffix(
|
|||
}
|
||||
}
|
||||
IdentSuffix::Bang => {
|
||||
// [purity-inference] TODO
|
||||
if let Content::Structure(FlatType::Func(_, _, _, fx)) =
|
||||
env.subs.get_content_without_compacting(loc_var.value)
|
||||
{
|
||||
match env.subs.get_content_without_compacting(*fx) {
|
||||
// [purity-inference] TODO: Should FlexVar actually be a case?
|
||||
Content::Pure | Content::FlexVar(_) => {
|
||||
problems.push(TypeError::SuffixedPureFunction(loc_var.region, symbol));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue