| # 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}} |