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
This actually touches upon an ambiguity in the spec. Namely whether ... should open up a struct only for regular fields or also for definitions.
The spec also now also allows ...T for structs (not yet allowed by the parser). The semantics for this is similar to JSON Schema's additional constraints and has mainly been introduced to allow encoding that behavior of JSON Schema as well as to make this syntactical element consistent between lists and structs.
It is likely that regular fields and definitions within a struct serve different roles. So applying ...T to both seem unintuitive and likely undesirable. If that is the case, having ... apply to both seems inconsistent.
Currently, this point is also moot, as definitions are allowed to be added in closed structs. But see #543. In that case, ... would have significance and I'm inclined to say that the spec should be clarified to have ... not apply to definitions.
I've not added an issue539.txtar file as this actually is invalid CUE as per the #543 proposal. For a discussion of this proposed change, please revert to that proposal Issue.
Originally opened by @shykes in cuelang/cue#539
What version of CUE are you using (
cue version
)?0.3.0-alpha3
Does this issue reproduce with the latest release?
What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: