Remove flex var case when checking symbol suffix

This commit is contained in:
Agus Zubiaga 2024-10-22 00:27:21 -03:00
parent 2859829ea8
commit ea35094b28
No known key found for this signature in database
2 changed files with 3 additions and 7 deletions

View file

@ -14913,7 +14913,7 @@ All branches in an `if` must have the same type!
import pf.Effect import pf.Effect
main! = \{} -> main! = \{} ->
printLn "Hello!" printLn "Hello"
printLn = Effect.putLine! printLn = Effect.putLine!
"# "#

View file

@ -1616,12 +1616,8 @@ fn check_symbol_suffix(
if let Content::Structure(FlatType::Func(_, _, _, fx)) = if let Content::Structure(FlatType::Func(_, _, _, fx)) =
env.subs.get_content_without_compacting(loc_var.value) env.subs.get_content_without_compacting(loc_var.value)
{ {
match env.subs.get_content_without_compacting(*fx) { if let Content::Pure = env.subs.get_content_without_compacting(*fx) {
// [purity-inference] TODO: Should FlexVar actually be a case? problems.push(TypeError::SuffixedPureFunction(loc_var.region, symbol));
Content::Pure | Content::FlexVar(_) => {
problems.push(TypeError::SuffixedPureFunction(loc_var.region, symbol));
}
_ => {}
} }
} }
} }