make sure lambda sets within aliases are in IntroducedVariables

This commit is contained in:
Folkert 2022-03-05 14:29:34 +01:00
parent 012a2d07a6
commit 6370a80c62
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 27 additions and 0 deletions

View file

@ -5509,4 +5509,24 @@ mod solve_expr {
r#"Id [ A, B, C { a : Str }e ] -> Str"#,
)
}
#[test]
fn lambda_set_within_alias_is_quantified() {
infer_eq_without_problem(
indoc!(
r#"
app "test" provides [ effectAlways ] to "./platform"
Effect a : [ @Effect ({} -> a) ]
effectAlways : a -> Effect a
effectAlways = \x ->
inner = \{} -> x
@Effect inner
"#
),
r#"a -> Effect [ inner a ]*"#,
)
}
}