-
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: verify issue 370 is fixed
Change-Id: I8d6f90e5500ea0df5156a4a1e12d349ad2fb7888 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6947 Reviewed-by: CUE cueckoo <cueckoo@gmail.com> Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 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,55 @@ | ||
|
||
-- x.cue -- | ||
package x | ||
|
||
#C1: { | ||
name: string | ||
} | ||
|
||
#C2: { | ||
#C1 | ||
age: int | ||
} | ||
|
||
c1: #C1 & { | ||
name: "cueckoo" | ||
} | ||
|
||
c2: #C2 & { | ||
c1 | ||
//age: 5 | ||
} | ||
-- out/eval -- | ||
(struct){ | ||
#C1: (#struct){ | ||
name: (string){ string } | ||
} | ||
#C2: (#struct){ | ||
name: (string){ string } | ||
age: (int){ int } | ||
} | ||
c1: (#struct){ | ||
name: (string){ "cueckoo" } | ||
} | ||
c2: (#struct){ | ||
name: (string){ "cueckoo" } | ||
age: (int){ int } | ||
} | ||
} | ||
-- out/compile -- | ||
--- x.cue | ||
{ | ||
#C1: { | ||
name: string | ||
} | ||
#C2: { | ||
〈1;#C1〉 | ||
age: int | ||
} | ||
c1: (〈0;#C1〉 & { | ||
name: "cueckoo" | ||
}) | ||
c2: (〈0;#C2〉 & { | ||
〈1;c1〉 | ||
}) | ||
} |