-
Notifications
You must be signed in to change notification settings - Fork 302
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: handle embedded top correctly
Other basic types were already correctly handled, but top slipped through the maze. Uncovered while debugging Issue #758 Change-Id: Iee99e0a0c5e8c1a7b2faa02b484c64f0e549391f Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8707 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
- Loading branch information
Showing
3 changed files
with
61 additions
and
14 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,49 @@ | ||
-- in.cue -- | ||
top: { | ||
a: {_} | ||
b: _ | ||
} | ||
|
||
scalar: { | ||
a: {string} | ||
b: string | ||
c: {{{number}}} | ||
d: number | ||
} | ||
-- out/eval -- | ||
(struct){ | ||
top: (struct){ | ||
a: (_){ _ } | ||
b: (_){ _ } | ||
} | ||
scalar: (struct){ | ||
a: (string){ string } | ||
b: (string){ string } | ||
c: (number){ number } | ||
d: (number){ number } | ||
} | ||
} | ||
-- out/compile -- | ||
--- in.cue | ||
{ | ||
top: { | ||
a: { | ||
_ | ||
} | ||
b: _ | ||
} | ||
scalar: { | ||
a: { | ||
string | ||
} | ||
b: string | ||
c: { | ||
{ | ||
{ | ||
number | ||
} | ||
} | ||
} | ||
d: number | ||
} | ||
} |
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