mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Report effectful top-level exprs
This commit is contained in:
parent
b62665e49e
commit
f666dba67d
5 changed files with 61 additions and 4 deletions
|
@ -1891,7 +1891,7 @@ fn constrain_call_fx(
|
|||
))
|
||||
}
|
||||
None => constraints.push_expected_type(ForReason(
|
||||
Reason::CallInTopLevelDef,
|
||||
Reason::CallInTopLevel,
|
||||
// top-level defs are only allowed to call pure functions
|
||||
constraints.push_variable(Variable::PURE),
|
||||
region,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue