cuelang.org/go@v0.10.1/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/stats -- 59 Leaks: 0 60 Freed: 6 61 Reused: 3 62 Allocs: 3 63 Retain: 0 64 65 Unifications: 6 66 Conjuncts: 17 67 Disjuncts: 6 68 -- out/eval -- 69 (struct){ 70 A: (struct){ 71 } 72 B: (struct){ 73 } 74 #C: (#struct){ 75 } 76 c: (#struct){ 77 aaa: (int){ 3 } 78 } 79 }