mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
make bound_symbols private
This commit is contained in:
parent
c531191e49
commit
ab8ac2edad
3 changed files with 17 additions and 10 deletions
|
@ -639,8 +639,7 @@ pub fn canonicalize_expr<'a>(
|
|||
loc_pattern.region,
|
||||
);
|
||||
|
||||
bound_by_argument_patterns
|
||||
.extend(new_output.references.bound_symbols.iter().copied());
|
||||
bound_by_argument_patterns.extend(new_output.references.bound_symbols().copied());
|
||||
|
||||
output.union(new_output);
|
||||
|
||||
|
@ -662,7 +661,7 @@ pub fn canonicalize_expr<'a>(
|
|||
captured_symbols.remove(&symbol);
|
||||
|
||||
// symbols bound either in this pattern or deeper down are not captured!
|
||||
captured_symbols.retain(|s| !new_output.references.bound_symbols.contains(s));
|
||||
captured_symbols.retain(|s| !new_output.references.bound_symbols().any(|x| x == s));
|
||||
captured_symbols.retain(|s| !bound_by_argument_patterns.contains(s));
|
||||
|
||||
// filter out top-level symbols
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue