mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Remove flex var case when checking symbol suffix
This commit is contained in:
parent
2859829ea8
commit
ea35094b28
2 changed files with 3 additions and 7 deletions
|
@ -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!
|
||||||
"#
|
"#
|
||||||
|
|
|
@ -1616,13 +1616,9 @@ 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?
|
|
||||||
Content::Pure | Content::FlexVar(_) => {
|
|
||||||
problems.push(TypeError::SuffixedPureFunction(loc_var.region, symbol));
|
problems.push(TypeError::SuffixedPureFunction(loc_var.region, symbol));
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue