mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Treat untyped suffixed functions as effectful
This commit is contained in:
parent
af6fc6306f
commit
cfc4be5254
25 changed files with 139 additions and 21 deletions
|
@ -3334,6 +3334,17 @@ fn unify_flat_type<M: MetaCollector>(
|
|||
|
||||
outcome
|
||||
}
|
||||
(EffectfulFunc, Func(args, closure, ret, fx)) => {
|
||||
let mut outcome = unify_pool(env, pool, Variable::EFFECTFUL, *fx, ctx.mode);
|
||||
|
||||
outcome.union(merge(
|
||||
env,
|
||||
ctx,
|
||||
Structure(Func(*args, *closure, *ret, Variable::EFFECTFUL)),
|
||||
));
|
||||
|
||||
outcome
|
||||
}
|
||||
(FunctionOrTagUnion(tag_names, tag_symbols, ext), Func(args, closure, ret, fx)) => {
|
||||
unify_function_or_tag_union_and_func(
|
||||
env,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue