diff --git a/crates/compiler/solve/src/solve.rs b/crates/compiler/solve/src/solve.rs index 1426506559..349e8427dc 100644 --- a/crates/compiler/solve/src/solve.rs +++ b/crates/compiler/solve/src/solve.rs @@ -3609,7 +3609,7 @@ fn check_for_infinite_type( } Content::LambdaSet(subs::LambdaSet { solved, - recursion_var: _, + recursion_var: OptVariable::NONE, unspecialized, ambient_function: ambient_function_var, }) => { diff --git a/crates/compiler/uitest/tests/recursive_type/multiple_nested_recursive_lambda_sets.txt b/crates/compiler/uitest/tests/recursive_type/multiple_nested_recursive_lambda_sets.txt new file mode 100644 index 0000000000..07ad8ff6a6 --- /dev/null +++ b/crates/compiler/uitest/tests/recursive_type/multiple_nested_recursive_lambda_sets.txt @@ -0,0 +1,25 @@ +# +opt infer:print_only_under_alias + +app "test" provides [main] to "./platform" + +Effect : {} -> Str + +after = \fx, toNext -> + afterInner = \{} -> + fxOut = fx {} + next = toNext fxOut + next {} + + afterInner + +await : Effect, (Str -> Effect) -> Effect +await = \fx, cont -> after fx (\result -> cont result) + +line : Str -> Effect +line = \s -> \{} -> s + +main = +#^^^^{-1} {} -[[afterInner(8) ({} -[[afterInner(8) ({} -a-> Str) (Str -[[13 (Str -[[20 Str]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str)), 16 Str] as a]-> Str) (Str -[[13 (Str -[[21]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str))] as [[afterInner(8) ({} -[[afterInner(8) ({} -a-> Str) (Str -[[13 (Str -[[20 Str]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str)), 16 Str] as a]-> Str) (Str -[[13 (Str -[[21]]-> ({} -[[16 Str]]-> Str))]]-> ({} -[[16 Str]]-> Str))] as b]]-> Str + await + (List.walk ["a", "b"] (line "printing letters") (\state, elem -> await state (\_ -> line elem))) + (\_ -> line "")