cuelang.org/go@v0.13.0/cue/testdata/cycle/050_resolved_self-reference_cycles_with_disjunctions.txtar (about) 1 #name: resolved self-reference cycles with disjunctions 2 #evalPartial 3 -- in.cue -- 4 a: b & {x: 1} | {y: 1} // {x:1,y:3,z:2} | {y:1} 5 b: {x: 2} | c & {z: 2} // {x:2} | {x:1,y:3,z:2} 6 c: a & {y: 3} | {z: 3} // {x:1,y:3,z:2} | {z:3} 7 -- out/def -- 8 a: b & { 9 x: 1 10 } | { 11 y: 1 12 } 13 b: { 14 x: 2 15 } | c & { 16 z: 2 17 } 18 c: a & { 19 y: 3 20 } | { 21 z: 3 22 } 23 -- out/legacy-debug -- 24 <0>{a: (<1>{x: 1, y: 3, z: 2} | <2>{y: 1}), b: (<3>{x: 2} | <4>{x: 1, y: 3, z: 2}), c: (<5>{x: 1, y: 3, z: 2} | <6>{z: 3})} 25 -- out/compile -- 26 --- in.cue 27 { 28 a: ((〈0;b〉 & { 29 x: 1 30 })|{ 31 y: 1 32 }) 33 b: ({ 34 x: 2 35 }|(〈0;c〉 & { 36 z: 2 37 })) 38 c: ((〈0;a〉 & { 39 y: 3 40 })|{ 41 z: 3 42 }) 43 } 44 -- out/eval/stats -- 45 Leaks: 0 46 Freed: 43 47 Reused: 32 48 Allocs: 11 49 Retain: 0 50 51 Unifications: 25 52 Conjuncts: 64 53 Disjuncts: 43 54 -- out/eval -- 55 (struct){ 56 a: (struct){ |((struct){ 57 x: (int){ 1 } 58 z: (int){ 2 } 59 y: (int){ 3 } 60 }, (struct){ 61 y: (int){ 1 } 62 }) } 63 b: (struct){ |((struct){ 64 x: (int){ 2 } 65 }, (struct){ 66 z: (int){ 2 } 67 y: (int){ 3 } 68 x: (int){ 1 } 69 }) } 70 c: (struct){ |((struct){ 71 y: (int){ 3 } 72 x: (int){ 1 } 73 z: (int){ 2 } 74 }, (struct){ 75 z: (int){ 3 } 76 }) } 77 }