-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/core/adt: fix disjunction bug
Default should return unmarked disjuncts, instead of an error. Fixes #1304 Fixes #1257 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: Idfe0302ede7a35cac7dfbbbf0c27242ebb1c3b32 Signed-off-by: Marcel van Lohuizen <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/527316 Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#Issue 1304 | ||
|
||
! cue export --out json x.cue | ||
cmp stdout expect_stdout_json | ||
cmp stderr expect_stderr_json | ||
|
||
! cue export --out cue x.cue | ||
cmp stdout expect_stdout_cue | ||
cmp stderr expect_stderr_cue | ||
|
||
! cue export --out yaml x.cue | ||
cmp stdout expect_stdout_yaml | ||
cmp stderr expect_stderr_yaml | ||
|
||
-- x.cue -- | ||
toto: value: *_|_ | (*"toto" | string) | ||
|
||
-- expect_stdout_cue -- | ||
-- expect_stderr_cue -- | ||
toto.value: incomplete value "toto" | string | ||
-- expect_stdout_json -- | ||
-- expect_stderr_json -- | ||
toto.value: incomplete value "toto" | string | ||
-- expect_stdout_yaml -- | ||
-- expect_stderr_yaml -- | ||
toto.value: incomplete value "toto" | string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters