You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes from the example above that result in completely unexplained success:
Removing out: { instance }
Changing out to simply out: instance (rather than using an embedding)
Removing any of alpha, bravo, and charlie (overkill, sure, but just to be safe, I checked the removal of each independently, keeping the rest of the sequence intact: alpha?: bravo?: bool, alpha?: charlie?: bool, etc.)
I have identified two other changes that also result in a successful evaluation. I understand these both to eliminate the effect of the "closed-ness" of #Root, but that doesn't quite make sense to me as I thought that ... was supposed to keep the struct open.
Changing #Root to Root
Embedding #Root, instead of unifying with it (i.e., #Type: { #Root, alpha?: ... })
Interestingly, adding delta to the chain (alpha?: bravo?: charlie?: delta?: bool, etc.), changes the error slightly:
$ cue eval error.cue
out.alpha.bravo: field `charlie` not allowed:
./error.cue:5:9
./error.cue:5:16
./error.cue:8:10
./error.cue:8:18
out.alpha.bravo.charlie: field `delta` not allowed:
./error.cue:5:16
./error.cue:5:25
./error.cue:8:18
./error.cue:8:28
Originally opened by @powerduncan in cuelang/cue#483
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
No error...
What did you see instead?
Changes from the example above that result in completely unexplained success:
out: { instance }
out
to simplyout: instance
(rather than using an embedding)alpha
,bravo
, andcharlie
(overkill, sure, but just to be safe, I checked the removal of each independently, keeping the rest of the sequence intact:alpha?: bravo?: bool
,alpha?: charlie?: bool
, etc.)I have identified two other changes that also result in a successful evaluation. I understand these both to eliminate the effect of the "closed-ness" of
#Root
, but that doesn't quite make sense to me as I thought that...
was supposed to keep the struct open.#Root
toRoot
#Root
, instead of unifying with it (i.e.,#Type: { #Root, alpha?: ... }
)Interestingly, adding
delta
to the chain (alpha?: bravo?: charlie?: delta?: bool
, etc.), changes the error slightly:(Converted from discussion thread at the behest of @myitcv.)
The text was updated successfully, but these errors were encountered: