Fix for-generator variable resolution in nested eager scope (#1706)

Fixes an issue around resolving for-generator variables in some cases
This commit is contained in:
Daniel Chao
2026-06-29 09:07:51 -07:00
committed by GitHub
parent 6239981869
commit 742a8e88da
5 changed files with 39 additions and 6 deletions
@@ -0,0 +1,15 @@
class Foo {
prop: String?
}
local foos: Mapping<String, Mixin<Foo>> = new Mapping<String, Mixin<Foo>> {
for (key, value in Map("foo", Map("key", "value"))) {
[key] = new {
when (value.keys.contains("key")) {
prop = value["key"]
}
}
}
}
res = foos["foo"].apply(new Foo {})
@@ -0,0 +1,3 @@
res {
prop = "value"
}