The Go jsonnet implementation of std.objectHas and std.objectHasEx(...,..., false) doesn't correctly honour the field visibility if an object is extended. Instead, it only checks whether the field is visible in the "current" object, even if the field is hidden in super:
The Go
jsonnet
implementation ofstd.objectHas
andstd.objectHasEx(...,..., false)
doesn't correctly honour the field visibility if an object is extended. Instead, it only checks whether the field is visible in the "current" object, even if the field is hidden insuper
:How to reproduce:
Expected value:
false
Actual value:
true
The C++
implementation of
std.objectHascorrectly returns
false`.Since
std.get(.... inc_hidden=false)
is implemented in terms ofstd.objectHas
, that function is also buggy:Expected value:
42
Actual value:
18
The C++ impl of
std.get
returns42