jrsonnet
jrsonnet copied to clipboard
X in super returns value while it shouldn't
From https://github.com/google/go-jsonnet/blob/master/testdata/insuper5.jsonnet
{ x: 42 } { y: { "false": "x" in super } }
➜ cjsonnet ./go-jsonnet-test/vendor/testdata/insuper5.jsonnet
{
"x": 42,
"y": {
"false": false
}
}
➜ jsonnet ./go-jsonnet-test/vendor/testdata/insuper5.jsonnet
{
"x": 42,
"y": {
"false": false
}
}
➜ jrsonnet ./go-jsonnet-test/vendor/testdata/insuper5.jsonnet
{
"x": 42,
"y": {
"false": true
}
}
Current version of jrsonnet incorrectly propagates super in case if it doesn't exists, i.e
{ a: 42 } { y: {} { "false": "a" in super } }
Returns the correct answer; super should be reset when making a new object, and not only when extending.
#193 completely refactors context propagation, and the bug is fixed here.