mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
remove unused variables from let/letrec
This commit is contained in:
parent
e82c670747
commit
7be41d8c09
9 changed files with 74 additions and 130 deletions
|
@ -660,12 +660,12 @@ fn fix_values_captured_in_closure_expr(
|
|||
use crate::expr::Expr::*;
|
||||
|
||||
match expr {
|
||||
LetNonRec(def, loc_expr, _) => {
|
||||
LetNonRec(def, loc_expr) => {
|
||||
// LetNonRec(Box<Def>, Box<Located<Expr>>, Variable, Aliases),
|
||||
fix_values_captured_in_closure_def(def, no_capture_symbols);
|
||||
fix_values_captured_in_closure_expr(&mut loc_expr.value, no_capture_symbols);
|
||||
}
|
||||
LetRec(defs, loc_expr, _) => {
|
||||
LetRec(defs, loc_expr) => {
|
||||
// LetRec(Vec<Def>, Box<Located<Expr>>, Variable, Aliases),
|
||||
fix_values_captured_in_closure_defs(defs, no_capture_symbols);
|
||||
fix_values_captured_in_closure_expr(&mut loc_expr.value, no_capture_symbols);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue