-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle defaults in both directions. This really seems to be a sumbsumption bug more than anything, but this makes trim more robust either way. Fixes #759 Change-Id: Iaadaf2c628f0e9a3a8edb268abdeb1d991adde18 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8703 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org> Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
- Loading branch information
Showing
2 changed files
with
27 additions
and
4 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 |
---|---|---|
@@ -1,7 +1,25 @@ | ||
-- in.cue -- | ||
foo: [string]: a: *1 | int | ||
foo: b: a: 1 | ||
domToSub: { | ||
foo: [string]: a: *1 | int | ||
foo: b: a: 1 | ||
} | ||
|
||
// Issue #759 | ||
subToDom: { | ||
#maybeString: {ip?: string} | ||
something: ip: *"default" | string | ||
something: #maybeString | ||
} | ||
-- out/trim -- | ||
== in.cue | ||
foo: [string]: a: *1 | int | ||
foo: b: {} | ||
domToSub: { | ||
foo: [string]: a: *1 | int | ||
foo: b: {} | ||
} | ||
|
||
// Issue #759 | ||
subToDom: { | ||
#maybeString: {ip?: string} | ||
something: ip: *"default" | string | ||
something: #maybeString | ||
} |
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