mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
make sure lambda sets within aliases are in IntroducedVariables
This commit is contained in:
parent
012a2d07a6
commit
6370a80c62
2 changed files with 27 additions and 0 deletions
|
@ -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 ]*"#,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue