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