-- in.cue -- // Test that cyclic references do not break structure sharing. This was the // underlying problem of Issue #3587. Note that this is not a problem related // to disjunctions. // These definitions represent a large tree of disjunctions. #D1: {a: #D2} | {b: #D2} | {c: #D2} #D2: {a: #D3} | {b: #D3} | {c: #D3} #D3: { one: {a: int} | {b: int} | {c: int} two: {a: string} | {b: string} | {c: string} three: {a: bool} | {b: bool} | {c: bool} } root: y: #D1 | [#D1] | {x: #D1} // Expensive path root: x: empty: {} root: "0": data: root_0.x.empty root: "1": data: root_1.x.empty root: "2": data: root_2.x.empty root: "3": data: root_3.x.empty // We want root to be shared in all of these cases. let root_0 = root let root_1 = root root_2: root root_3: root -- out/evalalpha/stats -- Leaks: 3 Freed: 63 Reused: 40 Allocs: 26 Retain: 0 Unifications: 45 Conjuncts: 72 Disjuncts: 21 NumCloseIDs: 1 -- diff/-out/evalalpha/stats<==>+out/eval/stats -- diff old new --- old +++ new @@ -1,9 +1,11 @@ -Leaks: 8 -Freed: 965 -Reused: 951 -Allocs: 22 -Retain: 17 - -Unifications: 559 -Conjuncts: 1046 -Disjuncts: 976 +Leaks: 3 +Freed: 63 +Reused: 40 +Allocs: 26 +Retain: 0 + +Unifications: 45 +Conjuncts: 72 +Disjuncts: 21 + +NumCloseIDs: 1 -- out/eval/stats -- Leaks: 8 Freed: 965 Reused: 951 Allocs: 22 Retain: 17 Unifications: 559 Conjuncts: 1046 Disjuncts: 976 -- out/evalalpha -- (struct){ #D1: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }) } #D2: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } #D3: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } root: (struct){ y: ((list|struct)){ |((#struct){ a: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#list){ 0: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }) } }, (struct){ x: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ a: ~(#D3) }, (#struct){ b: ~(#D3) }, (#struct){ c: ~(#D3) }) } }) } }) } x: (struct){ empty: (struct){ } } "0": (struct){ data: (struct){ } } "1": (struct){ data: (struct){ } } "2": (struct){ data: (struct){ } } "3": (struct){ data: (struct){ } } } let root_0#1 = ~(root) let root_1#2 = ~(root) root_2: ~(root) root_3: ~(root) } -- diff/-out/evalalpha<==>+out/eval -- diff old new --- old +++ new @@ -1,305 +1,35 @@ -Errors: -root_2: structural cycle: - ./in.cue:19:18 - -Result: -(_|_){ - // [structural cycle] +(struct){ #D1: (#struct){ |((#struct){ a: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }) } #D2: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } #D3: (#struct){ one: (#struct){ |((#struct){ @@ -324,676 +54,81 @@ c: (bool){ bool } }) } } - root: (_|_){ - // [structural cycle] + root: (struct){ y: ((list|struct)){ |((#struct){ a: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }, (#struct){ b: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }, (#struct){ c: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }, (#list){ 0: (#struct){ |((#struct){ a: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }) } - }, (#struct){ - b: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }) } - }, (#struct){ - c: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) + }) } + }, (#struct){ + b: (#struct){ |((#struct){ + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) + }) } + }, (#struct){ + c: (#struct){ |((#struct){ + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }) } }, (struct){ x: (#struct){ |((#struct){ a: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }) } - }, (#struct){ - b: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }) } - }, (#struct){ - c: (#struct){ |((#struct){ - a: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - b: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } - }, (#struct){ - c: (#struct){ - one: (#struct){ |((#struct){ - a: (int){ int } - }, (#struct){ - b: (int){ int } - }, (#struct){ - c: (int){ int } - }) } - two: (#struct){ |((#struct){ - a: (string){ string } - }, (#struct){ - b: (string){ string } - }, (#struct){ - c: (string){ string } - }) } - three: (#struct){ |((#struct){ - a: (bool){ bool } - }, (#struct){ - b: (bool){ bool } - }, (#struct){ - c: (bool){ bool } - }) } - } + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) + }) } + }, (#struct){ + b: (#struct){ |((#struct){ + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) + }) } + }, (#struct){ + c: (#struct){ |((#struct){ + a: ~(#D3) + }, (#struct){ + b: ~(#D3) + }, (#struct){ + c: ~(#D3) }) } }) } }) } @@ -1009,34 +144,17 @@ data: (struct){ } } - "2": (_|_){ - // [structural cycle] - data: (_|_){ - // [structural cycle] root_2: structural cycle: - // ./in.cue:19:18 - } - } - "3": (_|_){ - // [structural cycle] - data: (_|_){ - // [structural cycle] root_2: structural cycle: - // ./in.cue:19:18 - } - } - } - let root_0#1 = (_|_){ - // [structural cycle] root_0: structural cycle: - // ./in.cue:17:18 - } - let root_1#2 = (_|_){ - // [structural cycle] root_1: structural cycle: - // ./in.cue:18:18 - } - root_2: (_|_){ - // [structural cycle] root_2: structural cycle: - // ./in.cue:19:18 - } - root_3: (_|_){ - // [structural cycle] - } + "2": (struct){ + data: (struct){ + } + } + "3": (struct){ + data: (struct){ + } + } + } + let root_0#1 = ~(root) + let root_1#2 = ~(root) + root_2: ~(root) + root_3: ~(root) } -- out/eval -- Errors: root_2: structural cycle: ./in.cue:19:18 Result: (_|_){ // [structural cycle] #D1: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ b: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ c: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }) } #D2: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } #D3: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } root: (_|_){ // [structural cycle] y: ((list|struct)){ |((#struct){ a: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ b: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ c: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#list){ 0: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ b: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ c: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }) } }, (struct){ x: (#struct){ |((#struct){ a: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ b: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }, (#struct){ c: (#struct){ |((#struct){ a: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ b: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }, (#struct){ c: (#struct){ one: (#struct){ |((#struct){ a: (int){ int } }, (#struct){ b: (int){ int } }, (#struct){ c: (int){ int } }) } two: (#struct){ |((#struct){ a: (string){ string } }, (#struct){ b: (string){ string } }, (#struct){ c: (string){ string } }) } three: (#struct){ |((#struct){ a: (bool){ bool } }, (#struct){ b: (bool){ bool } }, (#struct){ c: (bool){ bool } }) } } }) } }) } }) } x: (struct){ empty: (struct){ } } "0": (struct){ data: (struct){ } } "1": (struct){ data: (struct){ } } "2": (_|_){ // [structural cycle] data: (_|_){ // [structural cycle] root_2: structural cycle: // ./in.cue:19:18 } } "3": (_|_){ // [structural cycle] data: (_|_){ // [structural cycle] root_2: structural cycle: // ./in.cue:19:18 } } } let root_0#1 = (_|_){ // [structural cycle] root_0: structural cycle: // ./in.cue:17:18 } let root_1#2 = (_|_){ // [structural cycle] root_1: structural cycle: // ./in.cue:18:18 } root_2: (_|_){ // [structural cycle] root_2: structural cycle: // ./in.cue:19:18 } root_3: (_|_){ // [structural cycle] } } -- out/compile -- --- in.cue { #D1: ({ a: 〈1;#D2〉 }|{ b: 〈1;#D2〉 }|{ c: 〈1;#D2〉 }) #D2: ({ a: 〈1;#D3〉 }|{ b: 〈1;#D3〉 }|{ c: 〈1;#D3〉 }) #D3: { one: ({ a: int }|{ b: int }|{ c: int }) two: ({ a: string }|{ b: string }|{ c: string }) three: ({ a: bool }|{ b: bool }|{ c: bool }) } root: { y: (〈1;#D1〉|[ 〈2;#D1〉, ]|{ x: 〈2;#D1〉 }) } root: { x: { empty: {} } } root: { "0": { data: 〈2;let root_0#1〉.x.empty } } root: { "1": { data: 〈2;let root_1#2〉.x.empty } } root: { "2": { data: 〈2;root_2〉.x.empty } } root: { "3": { data: 〈2;root_3〉.x.empty } } let root_0#1 = 〈0;root〉 let root_1#2 = 〈0;root〉 root_2: 〈0;root〉 root_3: 〈0;root〉 }