From 1c52d6a7d693133f04810da355f8036848c2c78a Mon Sep 17 00:00:00 2001 From: Cuichen Li Date: Fri, 21 Jan 2022 17:32:39 +0800 Subject: [PATCH] doc/spec: specify default constraint is not implemented For #1109 Signed-off-by: Cuichen Li Change-Id: Iaa5863923a80fd14e23bd1606e2acba0ee15b4fa Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/533342 Reviewed-by: Paul Jolly --- doc/ref/spec.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ref/spec.md b/doc/ref/spec.md index 6a099fb9f2c..acdea3908ce 100644 --- a/doc/ref/spec.md +++ b/doc/ref/spec.md @@ -1061,7 +1061,8 @@ Expression Result (without optional fields) ``` A struct may define constraints that apply to fields that are added when unified -with another struct using pattern or default constraints. +with another struct using pattern or default constraints (_Note_: default +constraints are not yet implemented). A _pattern constraint_, denoted `[pattern]: value`, defines a pattern, which is a value of type string, and a value to unify with fields whose label @@ -1086,6 +1087,7 @@ whose label does not unify with any of the patterns of the pattern constraints defined for `a` _and_ for which there exists no field in `a` with that label. The token `...` is a shorthand for `..._`. +_Note_: default constraints are not yet implemented. ``` @@ -1093,7 +1095,7 @@ a: { foo: string // foo is a string [=~"^i"]: int // all other fields starting with i are integers [=~"^b"]: bool // all other fields starting with b are booleans - ...string // all other fields must be a string + ...string // all other fields must be a string. Note: default constraints are not yet implemented. } b: a & {