diff --git a/compiler/mono/src/ir.rs b/compiler/mono/src/ir.rs index 4e939905b6..d47613906f 100644 --- a/compiler/mono/src/ir.rs +++ b/compiler/mono/src/ir.rs @@ -4733,6 +4733,7 @@ pub fn from_can<'a>( CapturedSymbols::None } Err(_) => { + // just allow this. see https://github.com/rtfeldman/roc/issues/1585 if captured_symbols.is_empty() { CapturedSymbols::None } else { diff --git a/compiler/test_gen/src/gen_primitives.rs b/compiler/test_gen/src/gen_primitives.rs index 91c2157c88..149e083c93 100644 --- a/compiler/test_gen/src/gen_primitives.rs +++ b/compiler/test_gen/src/gen_primitives.rs @@ -2712,7 +2712,6 @@ fn int_literal_not_specialized() { } #[test] -#[ignore] fn unresolved_tvar_when_capture_is_unused() { // see https://github.com/rtfeldman/roc/issues/1585 assert_evals_to!( @@ -2725,8 +2724,7 @@ fn unresolved_tvar_when_capture_is_unused() { r : Bool r = False - # underscore does not change the problem, maybe it's type-related? We don 't really know what `Green` refers to below - p1 = (\x -> r == (1 == 1)) + p1 = (\_ -> r == (1 == 1)) oneOfResult = List.map [p1] (\p -> p Green) when oneOfResult is