Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
cue/parser: allow pattern constraints unconditionally
Browse files Browse the repository at this point in the history
This was a temporary measure that was reverted.
This check should have been removed earlier.

Change-Id: I6a0d19fb3d59463d87d303457fc081f9def17c9b
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9685
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed May 5, 2021
1 parent 3316905 commit c2a68a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions cue/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"cuelang.org/go/cue/literal"
"cuelang.org/go/cue/scanner"
"cuelang.org/go/cue/token"
"cuelang.org/go/internal"
"cuelang.org/go/internal/astinternal"
)

Expand Down Expand Up @@ -756,15 +755,6 @@ func (p *parser) parseFieldList() (list []ast.Decl) {
// and we have eliminated the need comment positions.
}

if len(list) > 1 {
for _, d := range list {
if internal.IsBulkField(d) {
p.assertV0(p.pos, 2, 0, `combining bulk optional fields with other fields`)
break
}
}
}

return
}

Expand Down
5 changes: 0 additions & 5 deletions cue/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,6 @@ func TestStrict(t *testing.T) {
`a b c: 2`},
{"reserved identifiers",
`__foo: 3`},
{"bulk optional fields",
`a: {
foo: "bar"
[string]: string
}`},
}
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
Expand Down

0 comments on commit c2a68a9

Please sign in to comment.