blob: a60d57a82104bae47632847f57df1bea97b48fba [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: definitions with embedding
#evalPartial
-- in.cue --
#E: {
a: {b: int}
}
#S: {
#E
a: {c: int}
b: 3
}
// adding a field to a nested struct that is closed.
#e1: #S & {a: d: 4}
// literal struct not closed until after unification.
#v1: #S & {a: c: 4}
-- out/def --
#E: {
a: {
b: int
}
}
#S: {
a: {
c: int
}
b: 3
#E
}
// adding a field to a nested struct that is closed.
#e1: #S & {
a: {
d: 4
}
}
// literal struct not closed until after unification.
#v1: #S & {
a: {
c: 4
}
}
-- out/export --
-- out/yaml --
{}
-- out/json --
{}
-- out/legacy-debug --
<0>{#E: <1>C{a: <2>C{b: int}}, #S: <3>C{a: <4>C{b: int, c: int}, b: 3}, #e1: <5>C{a: _|_(4:field "d" not allowed in closed struct), b: 3}, #v1: <6>C{a: <7>C{b: int, c: 4}, b: 3}}
-- out/compile --
--- in.cue
{
#E: {
a: {
b: int
}
}
#S: {
1;#E
a: {
c: int
}
b: 3
}
#e1: (〈0;#S〉 & {
a: {
d: 4
}
})
#v1: (〈0;#S〉 & {
a: {
c: 4
}
})
}
-- out/eval --
Errors:
#e1.a: field `d` not allowed
Result:
(_|_){
// [eval]
#E: (#struct){
a: (#struct){
b: (int){ int }
}
}
#S: (#struct){
a: (#struct){
b: (int){ int }
c: (int){ int }
}
b: (int){ 3 }
}
#e1: (_|_){
// [eval]
a: (_|_){
// [eval] #e1.a: field `d` not allowed
b: (int){ int }
c: (int){ int }
d: (int){ 4 }
}
b: (int){ 3 }
}
#v1: (#struct){
a: (#struct){
b: (int){ int }
c: (int){ 4 }
}
b: (int){ 3 }
}
}