mirror of
https://github.com/apple/pkl.git
synced 2026-05-03 05:34:26 +02:00
Eagerly check function arguments when called from inside iterable (#778)
This mitigates an issue where lazy mappings and listings widen an existing bug. This is a follow-up to https://github.com/apple/pkl/pull/752.
This commit is contained in:
@@ -31,3 +31,27 @@ res2 {
|
||||
}.birds
|
||||
}
|
||||
}
|
||||
|
||||
res3 {
|
||||
for (key, _ in Map("hello-there", 5)) {
|
||||
...myself(new Listing {
|
||||
new Listing {
|
||||
key
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
res4 {
|
||||
for (key, _ in Map("hello-there", 5)) {
|
||||
...myself2.apply(new Listing {
|
||||
new Listing {
|
||||
key
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function myself(l: Listing<Listing<String>>) = l
|
||||
|
||||
local myself2 = (l: Listing<Listing<String>>) -> l
|
||||
|
||||
@@ -8,3 +8,13 @@ res2 {
|
||||
age = 1
|
||||
}
|
||||
}
|
||||
res3 {
|
||||
new {
|
||||
"hello-there"
|
||||
}
|
||||
}
|
||||
res4 {
|
||||
new {
|
||||
"hello-there"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user