cuelang.org/go@v0.10.1/cue/testdata/definitions/issue419.txtar (about) 1 -- in.cue -- 2 #A: { 3 a: string 4 } 5 6 #B: { 7 b: string 8 } 9 10 #X: #A | #B 11 12 l: [...#X] 13 14 l: [ 15 {b: "bar"}, 16 ] 17 -- out/eval/stats -- 18 Leaks: 0 19 Freed: 17 20 Reused: 12 21 Allocs: 5 22 Retain: 0 23 24 Unifications: 13 25 Conjuncts: 25 26 Disjuncts: 17 27 -- out/eval -- 28 (struct){ 29 #A: (#struct){ 30 a: (string){ string } 31 } 32 #B: (#struct){ 33 b: (string){ string } 34 } 35 #X: (#struct){ |((#struct){ 36 a: (string){ string } 37 }, (#struct){ 38 b: (string){ string } 39 }) } 40 l: (#list){ 41 0: (#struct){ 42 b: (string){ "bar" } 43 } 44 } 45 } 46 -- out/compile -- 47 --- in.cue 48 { 49 #A: { 50 a: string 51 } 52 #B: { 53 b: string 54 } 55 #X: (〈0;#A〉|〈0;#B〉) 56 l: [ 57 ...〈1;#X〉, 58 ] 59 l: [ 60 { 61 b: "bar" 62 }, 63 ] 64 }