mirror of
https://github.com/apple/pkl.git
synced 2026-05-03 13:44:26 +02:00
fix bug with for generator variables in mixin (#297)
This commit is contained in:
@@ -38,3 +38,13 @@ function mapEnvLiteral(_env: Dynamic) = (it) -> (it) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addElements(keys: List<String>): Mixin<Mapping<String, String>> = new {
|
||||
for (key in keys) {
|
||||
[key] = key
|
||||
}
|
||||
}
|
||||
|
||||
res = new Mapping<String, String> {
|
||||
["base"] = "alreadyThere"
|
||||
} |> addElements(List("newElement"))
|
||||
|
||||
@@ -36,3 +36,7 @@ foo {
|
||||
}
|
||||
}
|
||||
}
|
||||
res {
|
||||
["base"] = "alreadyThere"
|
||||
["newElement"] = "newElement"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user