Closed myitcv closed 3 years ago
CUE makes no distinction between embedded structs or embedded scalars. This behavior is especially useful if the embedded values are references.
This issue has been migrated to https://github.com/cue-lang/cue/issues/1034.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
If we do:
we get the following error:
This seems wrong, because whilst
#SomeBaseType.#AUTO
does reference#SomeBaseType
, the fact the disjunction is unresolved should not matter, because we are addressing#AUTO
.If we then do:
(i.e. ignoring
V3
) then we get:Here we would expect
V2
to be"z"
, but because of the error described above the default gets eliminated, hence we are left with"x" | "y"
; so not as expected, but at least understandable in the context of the previous observation.If we then do:
we get no output, no error message, and a non-zero exit code. As stated above we would expect
V2
to be"z"
, but given the current output fromcue eval foo.cue
we would, given the current implementation, expect an error message like:But this final scenario is effectively two errors stacked on top of each other, so it's not clear that our expectation is reasonable here.
What did you expect to see?
As above.
What did you see instead?
As above.
cc @dubo-dubon-duponey