mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Prevent top-level fns from capturing params
This commit is contained in:
parent
d23a8dc618
commit
d775d9ef53
1 changed files with 4 additions and 0 deletions
|
@ -411,6 +411,10 @@ pub fn canonicalize_module_defs<'a>(
|
|||
|
||||
let loc_pattern = Loc::at(pattern.region, can_pattern);
|
||||
|
||||
for (symbol, _) in BindingsFromPattern::new(&loc_pattern) {
|
||||
env.top_level_symbols.insert(symbol);
|
||||
}
|
||||
|
||||
(
|
||||
var_store.fresh(),
|
||||
AnnotatedMark::new(var_store),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue