From d27a72de1fc61bed10e56a29c5e181a187f8dc36 Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Thu, 12 Jan 2023 10:31:06 -0600 Subject: [PATCH] Weaken let sequences under let binding --- crates/compiler/constrain/src/expr.rs | 2 +- crates/compiler/solve/tests/solve_expr.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/compiler/constrain/src/expr.rs b/crates/compiler/constrain/src/expr.rs index 2583cca65b..0ca7682556 100644 --- a/crates/compiler/constrain/src/expr.rs +++ b/crates/compiler/constrain/src/expr.rs @@ -3828,13 +3828,13 @@ fn is_generalizable_expr(mut expr: &Expr) -> bool { OpaqueRef { argument, .. } => expr = &argument.1.value, Str(_) | List { .. } | SingleQuote(_, _, _, _) | When { .. } | If { .. } | LetRec(_, _, _) + | LetNonRec(_, _) => { return false } // TODO(weakening) Var(_, _) | AbilityMember(_, _, _) - | LetNonRec(_, _) | Call(_, _, _) | RunLowLevel { .. } | ForeignCall { .. } diff --git a/crates/compiler/solve/tests/solve_expr.rs b/crates/compiler/solve/tests/solve_expr.rs index aad2979ec4..0bc19251a7 100644 --- a/crates/compiler/solve/tests/solve_expr.rs +++ b/crates/compiler/solve/tests/solve_expr.rs @@ -7140,7 +7140,7 @@ mod solve_expr { #^^^{-1} "# ), - @r#"fun : {} -[[thunk(5) [A Str]*, thunk(5) { a : Str }]]-> Str"# + @r#"fun : {} -[[thunk(5) [A Str]w_a, thunk(5) { a : Str }]]-> Str"# ); }