github.com/solo-io/cue@v0.4.7/cue/testdata/definitions/036_optionals_in_open_structs.txtar (about) 1 # DO NOT EDIT; generated by go run testdata/gen.go 2 # 3 #name: optionals in open structs 4 #evalFull 5 -- in.cue -- 6 A: { 7 [=~"^[a-s]*$"]: int 8 } 9 B: { 10 [=~"^[m-z]*$"]: int 11 } 12 #C: {A & B} 13 c: #C & {aaa: 3} 14 -- out/def -- 15 A: { 16 [=~"^[a-s]*$"]: int 17 } 18 B: { 19 [=~"^[m-z]*$"]: int 20 } 21 #C: { 22 A & B 23 } 24 c: #C & { 25 aaa: 3 26 } 27 -- out/export -- 28 A: {} 29 B: {} 30 c: { 31 aaa: 3 32 } 33 -- out/yaml -- 34 A: {} 35 B: {} 36 c: 37 aaa: 3 38 -- out/json -- 39 {"A":{},"B":{},"c":{"aaa":3}} 40 -- out/legacy-debug -- 41 <0>{A: <1>{[=~"^[a-s]*$"]: <2>(_: string)->int, }, B: <3>{[=~"^[m-z]*$"]: <4>(_: string)->int, }, #C: <5>C{[=~"^[a-s]*$"]: <6>(_: string)->int, [=~"^[m-z]*$"]: <7>(_: string)->int, }, c: <8>C{[=~"^[a-s]*$"]: <9>(_: string)->int, [=~"^[m-z]*$"]: <10>(_: string)->int, aaa: 3}} 42 -- out/compile -- 43 --- in.cue 44 { 45 A: { 46 [=~"^[a-s]*$"]: int 47 } 48 B: { 49 [=~"^[m-z]*$"]: int 50 } 51 #C: { 52 (〈1;A〉 & 〈1;B〉) 53 } 54 c: (〈0;#C〉 & { 55 aaa: 3 56 }) 57 } 58 -- out/eval -- 59 (struct){ 60 A: (struct){ 61 } 62 B: (struct){ 63 } 64 #C: (#struct){ 65 } 66 c: (#struct){ 67 aaa: (int){ 3 } 68 } 69 }