Merge pull request #6499 from JRI98/fix_6174

Don't skip closure captures when fixing them
This commit is contained in:
Folkert de Vries 2024-02-04 13:57:18 +01:00 committed by GitHub
commit 4cbdf08a2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 67 additions and 5 deletions

View file

@ -3474,3 +3474,29 @@ fn issue_5513() {
"
)
}
#[mono_test]
fn issue_6174() {
indoc!(
r"
g = Bool.false
a = \_ ->
if g then
Ok 0
else
Err NoNumber
b = \_ ->
if g then
Ok 0
else
Err NoNumber
c = \_ ->
[a {}, b {}]
c {}
"
)
}