Skip to content

Commit 1c52d6a

Browse files
cuichenlimyitcv
authored andcommitted
doc/spec: specify default constraint is not implemented
For #1109 Signed-off-by: Cuichen Li <cuichli@cisco.com> Change-Id: Iaa5863923a80fd14e23bd1606e2acba0ee15b4fa Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/533342 Reviewed-by: Paul Jolly <paul@myitcv.io>
1 parent e0577bb commit 1c52d6a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/ref/spec.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,8 @@ Expression Result (without optional fields)
10611061
```
10621062

10631063
A struct may define constraints that apply to fields that are added when unified
1064-
with another struct using pattern or default constraints.
1064+
with another struct using pattern or default constraints (_Note_: default
1065+
constraints are not yet implemented).
10651066

10661067
A _pattern constraint_, denoted `[pattern]: value`, defines a pattern, which
10671068
is a value of type string, and a value to unify with fields whose label
@@ -1086,14 +1087,15 @@ whose label does not unify with any of the patterns of the pattern
10861087
constraints defined for `a` _and_ for which there exists no field in `a`
10871088
with that label.
10881089
The token `...` is a shorthand for `..._`.
1090+
_Note_: default constraints are not yet implemented.
10891091

10901092

10911093
```
10921094
a: {
10931095
foo: string // foo is a string
10941096
[=~"^i"]: int // all other fields starting with i are integers
10951097
[=~"^b"]: bool // all other fields starting with b are booleans
1096-
...string // all other fields must be a string
1098+
...string // all other fields must be a string. Note: default constraints are not yet implemented.
10971099
}
10981100
10991101
b: a & {

0 commit comments

Comments
 (0)