github.com/solo-io/cue@v0.4.7/cue/testdata/definitions/issue471.txtar (about) 1 -- in.cue -- 2 package x 3 4 #a: (#c | #d) & { 5 name: string 6 } 7 8 #a1: #c & { 9 name: string 10 } 11 12 #a2: #d & { 13 name: string 14 } 15 16 #c: { 17 name: string 18 age: int 19 } 20 21 #d: { 22 name: string 23 address: string 24 } 25 -- out/eval -- 26 (struct){ 27 #a: (#struct){ |((#struct){ 28 name: (string){ string } 29 age: (int){ int } 30 }, (#struct){ 31 name: (string){ string } 32 address: (string){ string } 33 }) } 34 #a1: (#struct){ 35 name: (string){ string } 36 age: (int){ int } 37 } 38 #a2: (#struct){ 39 name: (string){ string } 40 address: (string){ string } 41 } 42 #c: (#struct){ 43 name: (string){ string } 44 age: (int){ int } 45 } 46 #d: (#struct){ 47 name: (string){ string } 48 address: (string){ string } 49 } 50 } 51 -- out/compile -- 52 --- in.cue 53 { 54 #a: ((〈0;#c〉|〈0;#d〉) & { 55 name: string 56 }) 57 #a1: (〈0;#c〉 & { 58 name: string 59 }) 60 #a2: (〈0;#d〉 & { 61 name: string 62 }) 63 #c: { 64 name: string 65 age: int 66 } 67 #d: { 68 name: string 69 address: string 70 } 71 }