Correctly choose specialized shapes for anonymous closures

This commit is contained in:
Ayaz Hafiz 2022-12-27 09:18:41 -06:00
parent 593344f5c5
commit 1e847efbfe
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 205 additions and 39 deletions

View file

@ -2220,3 +2220,23 @@ fn lambda_set_with_imported_toplevels_issue_4733() {
"###
)
}
#[mono_test]
fn issue_4717() {
indoc!(
r###"
app "test" provides [main] to "platform"
chompWhile : (List U8) -> (List U8)
chompWhile = \input ->
index = List.walkUntil input 0 \i, _ -> Break i
if index == 0 then
input
else
List.drop input index
main = chompWhile [1u8, 2u8, 3u8]
"###
)
}