Closed verdverm closed 3 years ago
AFAIU, this is working "as expected" but is effectively the same problem of a list type defaulting to []
, picked up in the required fields proposal. i.e. the default value of #A
here is {}
. What I think you are looking to distinguish is whether ex.bar
is specified or not, and that is where the !
proposal comes in.
It is working as expected because, as documented, a struct is always considered concrete.
As per the doc:
It does not verify that values of lists or structs are concrete themselves.
What version of CUE are you using (
cue version
)?0.3.0
What did you do?
Called
cue.Value.IsConcrete()
via the Go API and got unexpected results. If this does indeed seem like a bug, then I can create a reproducer.In the example below, calling
IsConcrete()
forex.bar.
reports true, is this expected?What did you expect to see?
ex.bar.IsConcrete()
returning falseWhat did you see instead?
ex.bar.IsConcrete()
returning true