cuelang.org/go@v0.10.1/cue/testdata/definitions/dynamic.txtar (about) 1 -- in.cue -- 2 #A: { 3 a: "foo" 4 "\(a)": 3 5 } 6 #B: a: b: { 7 c: string 8 d: 2 9 } 10 #C: a: b: { 11 c: *"d" | string 12 (c): 2 13 } 14 15 x: #B & #C 16 17 -- out/eval/stats -- 18 Leaks: 0 19 Freed: 23 20 Reused: 16 21 Allocs: 7 22 Retain: 1 23 24 Unifications: 19 25 Conjuncts: 29 26 Disjuncts: 23 27 -- out/eval -- 28 (struct){ 29 #A: (#struct){ 30 a: (string){ "foo" } 31 foo: (int){ 3 } 32 } 33 #B: (#struct){ 34 a: (#struct){ 35 b: (#struct){ 36 c: (string){ string } 37 d: (int){ 2 } 38 } 39 } 40 } 41 #C: (#struct){ 42 a: (#struct){ 43 b: (#struct){ 44 c: (string){ |(*(string){ "d" }, (string){ string }) } 45 d: (int){ 2 } 46 } 47 } 48 } 49 x: (#struct){ 50 a: (#struct){ 51 b: (#struct){ 52 c: (string){ |(*(string){ "d" }, (string){ string }) } 53 d: (int){ 2 } 54 } 55 } 56 } 57 } 58 -- out/compile -- 59 --- in.cue 60 { 61 #A: { 62 a: "foo" 63 "\(〈0;a〉)": 3 64 } 65 #B: { 66 a: { 67 b: { 68 c: string 69 d: 2 70 } 71 } 72 } 73 #C: { 74 a: { 75 b: { 76 c: (*"d"|string) 77 〈0;c〉: 2 78 } 79 } 80 } 81 x: (〈0;#B〉 & 〈0;#C〉) 82 }