Fix variable resolution of object body params (#1788)

Fixes a regression introduced in Pkl 0.32.
This commit is contained in:
Daniel Chao
2026-07-22 13:04:36 -07:00
committed by GitHub
parent 03792be984
commit 2242cc9c82
5 changed files with 36 additions and 0 deletions
@@ -0,0 +1,9 @@
foo = new Mapping {
default { key ->
for (idx, char in key.split("")) {
["\(char)_\(idx)"] = "hi"
}
}
["zzz"] {}
}
@@ -0,0 +1,8 @@
foo = new Mapping {
default { key ->
when (key is String) {
bar = key
}
}
["x"] {}
}
@@ -0,0 +1,7 @@
foo {
["zzz"] {
["z_0"] = "hi"
["z_1"] = "hi"
["z_2"] = "hi"
}
}
@@ -0,0 +1,5 @@
foo {
["x"] {
bar = "x"
}
}