Skip to content

Commit

Permalink
internal/core/eval: verify issue 370 is fixed
Browse files Browse the repository at this point in the history
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
mpvl committed Aug 21, 2020
1 parent 121ace7 commit 4ecec98
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions cue/testdata/definitions/issue370.txtar
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〉
})
}

0 comments on commit 4ecec98

Please sign in to comment.