-
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.
internal/core/eval: re-allow ... with embeddings
Fixes #552 Change-Id: I95583aa5f2d532fa10bc54f6be2466b6771f7298 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7401 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
3 changed files
with
78 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
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,77 @@ | ||
-- in.cue -- | ||
#A: { | ||
Common | ||
... | ||
} | ||
|
||
Common: { | ||
a: int | ||
b: int | ||
} | ||
|
||
x: #A | ||
x: { | ||
c: int | ||
} | ||
|
||
#B: { | ||
if true { | ||
a: int | ||
} | ||
... | ||
} | ||
|
||
y: #B | ||
y: { | ||
c: int | ||
} | ||
|
||
-- out/eval -- | ||
(struct){ | ||
#A: (#struct){ | ||
a: (int){ int } | ||
b: (int){ int } | ||
} | ||
Common: (struct){ | ||
a: (int){ int } | ||
b: (int){ int } | ||
} | ||
x: (#struct){ | ||
a: (int){ int } | ||
b: (int){ int } | ||
c: (int){ int } | ||
} | ||
#B: (#struct){ | ||
a: (int){ int } | ||
} | ||
y: (#struct){ | ||
c: (int){ int } | ||
a: (int){ int } | ||
} | ||
} | ||
-- out/compile -- | ||
--- in.cue | ||
{ | ||
#A: { | ||
〈1;Common〉 | ||
... | ||
} | ||
Common: { | ||
a: int | ||
b: int | ||
} | ||
x: 〈0;#A〉 | ||
x: { | ||
c: int | ||
} | ||
#B: { | ||
if true { | ||
a: int | ||
} | ||
... | ||
} | ||
y: 〈0;#B〉 | ||
y: { | ||
c: int | ||
} | ||
} |
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