mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
refactor
This commit is contained in:
parent
74df66a472
commit
a15183a7d1
8 changed files with 83 additions and 78 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::def::{canonicalize_defs, sort_can_defs, Declaration, Def};
|
||||
use crate::env::Env;
|
||||
use crate::expr::{Expr, Output};
|
||||
use crate::expr::{ClosureData, Expr, Output};
|
||||
use crate::operator::desugar_def;
|
||||
use crate::pattern::Pattern;
|
||||
use crate::scope::Scope;
|
||||
|
@ -416,13 +416,13 @@ fn fix_values_captured_in_closure_expr(
|
|||
fix_values_captured_in_closure_expr(&mut loc_expr.value, no_capture_symbols);
|
||||
}
|
||||
|
||||
Closure {
|
||||
Closure(ClosureData {
|
||||
captured_symbols,
|
||||
name,
|
||||
arguments,
|
||||
loc_body,
|
||||
..
|
||||
} => {
|
||||
}) => {
|
||||
captured_symbols.retain(|(s, _)| !no_capture_symbols.contains(s));
|
||||
captured_symbols.retain(|(s, _)| s != name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue