cuelang.org/go@v0.13.0/cue/testdata/cycle/issue3571.txtar (about) 1 -- in.cue -- 2 // These tests should NOT have structural cycles. 3 simplified: { 4 #T 5 in: _ 6 x: #T 7 x: x: #T 8 9 #T: { 10 in: x 11 x: _ 12 } 13 } 14 15 issue3571: { 16 a: #T 17 a: in: f: true 18 a: #in: { 19 g: #T 20 g: #in: f: #T 21 g: #in: f: #in: x: true 22 f?: _ 23 } 24 25 #T: { 26 in: #in 27 #in: _ 28 } 29 } 30 -- out/eval/stats -- 31 Leaks: 0 32 Freed: 54 33 Reused: 42 34 Allocs: 12 35 Retain: 19 36 37 Unifications: 54 38 Conjuncts: 125 39 Disjuncts: 73 40 -- out/evalalpha -- 41 (struct){ 42 simplified: (#struct){ 43 in: (#struct){ 44 x: (#struct){ 45 in: (_){ _ } 46 x: (_){ _ } 47 } 48 in: ~(simplified.in.x) 49 } 50 x: (#struct){ 51 x: (#struct){ 52 in: (_){ _ } 53 x: (_){ _ } 54 } 55 in: ~(simplified.x.x) 56 } 57 #T: (#struct){ 58 in: (_){ _ } 59 x: (_){ _ } 60 } 61 } 62 issue3571: (struct){ 63 a: (#struct){ 64 in: (#struct){ 65 f: (bool){ true } 66 g: (#struct){ 67 #in: (#struct){ 68 f: (#struct){ 69 #in: (#struct){ 70 x: (bool){ true } 71 } 72 in: ~(issue3571.a.in.g.#in.f.#in) 73 } 74 } 75 in: ~(issue3571.a.in.g.#in) 76 } 77 } 78 #in: (#struct){ 79 g: (#struct){ 80 #in: (#struct){ 81 f: (#struct){ 82 #in: (#struct){ 83 x: (bool){ true } 84 } 85 in: ~(issue3571.a.#in.g.#in.f.#in) 86 } 87 } 88 in: ~(issue3571.a.#in.g.#in) 89 } 90 f?: (_){ _ } 91 } 92 } 93 #T: (#struct){ 94 in: (_){ _ } 95 #in: (_){ _ } 96 } 97 } 98 } 99 -- diff/-out/evalalpha<==>+out/eval -- 100 diff old new 101 --- old 102 +++ new 103 @@ -1,24 +1,18 @@ 104 (struct){ 105 simplified: (#struct){ 106 in: (#struct){ 107 - in: (#struct){ 108 - in: (_){ _ } 109 - x: (_){ _ } 110 - } 111 - x: (#struct){ 112 - in: (_){ _ } 113 - x: (_){ _ } 114 - } 115 + x: (#struct){ 116 + in: (_){ _ } 117 + x: (_){ _ } 118 + } 119 + in: ~(simplified.in.x) 120 } 121 x: (#struct){ 122 - in: (#struct){ 123 - in: (_){ _ } 124 - x: (_){ _ } 125 - } 126 - x: (#struct){ 127 - in: (_){ _ } 128 - x: (_){ _ } 129 - } 130 + x: (#struct){ 131 + in: (_){ _ } 132 + x: (_){ _ } 133 + } 134 + in: ~(simplified.x.x) 135 } 136 #T: (#struct){ 137 in: (_){ _ } 138 @@ -28,52 +22,30 @@ 139 issue3571: (struct){ 140 a: (#struct){ 141 in: (#struct){ 142 - g: (#struct){ 143 - in: (#struct){ 144 - f: (#struct){ 145 - in: (#struct){ 146 - x: (bool){ true } 147 - } 148 - #in: (#struct){ 149 - x: (bool){ true } 150 - } 151 - } 152 - } 153 - #in: (#struct){ 154 - f: (#struct){ 155 - in: (#struct){ 156 - x: (bool){ true } 157 - } 158 - #in: (#struct){ 159 - x: (bool){ true } 160 - } 161 - } 162 - } 163 - } 164 f: (bool){ true } 165 + g: (#struct){ 166 + #in: (#struct){ 167 + f: (#struct){ 168 + #in: (#struct){ 169 + x: (bool){ true } 170 + } 171 + in: ~(issue3571.a.in.g.#in.f.#in) 172 + } 173 + } 174 + in: ~(issue3571.a.in.g.#in) 175 + } 176 } 177 #in: (#struct){ 178 g: (#struct){ 179 - in: (#struct){ 180 - f: (#struct){ 181 - in: (#struct){ 182 - x: (bool){ true } 183 - } 184 - #in: (#struct){ 185 - x: (bool){ true } 186 - } 187 - } 188 - } 189 - #in: (#struct){ 190 - f: (#struct){ 191 - in: (#struct){ 192 - x: (bool){ true } 193 - } 194 - #in: (#struct){ 195 - x: (bool){ true } 196 - } 197 - } 198 - } 199 + #in: (#struct){ 200 + f: (#struct){ 201 + #in: (#struct){ 202 + x: (bool){ true } 203 + } 204 + in: ~(issue3571.a.#in.g.#in.f.#in) 205 + } 206 + } 207 + in: ~(issue3571.a.#in.g.#in) 208 } 209 f?: (_){ _ } 210 } 211 -- out/eval -- 212 (struct){ 213 simplified: (#struct){ 214 in: (#struct){ 215 in: (#struct){ 216 in: (_){ _ } 217 x: (_){ _ } 218 } 219 x: (#struct){ 220 in: (_){ _ } 221 x: (_){ _ } 222 } 223 } 224 x: (#struct){ 225 in: (#struct){ 226 in: (_){ _ } 227 x: (_){ _ } 228 } 229 x: (#struct){ 230 in: (_){ _ } 231 x: (_){ _ } 232 } 233 } 234 #T: (#struct){ 235 in: (_){ _ } 236 x: (_){ _ } 237 } 238 } 239 issue3571: (struct){ 240 a: (#struct){ 241 in: (#struct){ 242 g: (#struct){ 243 in: (#struct){ 244 f: (#struct){ 245 in: (#struct){ 246 x: (bool){ true } 247 } 248 #in: (#struct){ 249 x: (bool){ true } 250 } 251 } 252 } 253 #in: (#struct){ 254 f: (#struct){ 255 in: (#struct){ 256 x: (bool){ true } 257 } 258 #in: (#struct){ 259 x: (bool){ true } 260 } 261 } 262 } 263 } 264 f: (bool){ true } 265 } 266 #in: (#struct){ 267 g: (#struct){ 268 in: (#struct){ 269 f: (#struct){ 270 in: (#struct){ 271 x: (bool){ true } 272 } 273 #in: (#struct){ 274 x: (bool){ true } 275 } 276 } 277 } 278 #in: (#struct){ 279 f: (#struct){ 280 in: (#struct){ 281 x: (bool){ true } 282 } 283 #in: (#struct){ 284 x: (bool){ true } 285 } 286 } 287 } 288 } 289 f?: (_){ _ } 290 } 291 } 292 #T: (#struct){ 293 in: (_){ _ } 294 #in: (_){ _ } 295 } 296 } 297 } 298 -- out/compile -- 299 --- in.cue 300 { 301 simplified: { 302 〈0;#T〉 303 in: _ 304 x: 〈0;#T〉 305 x: { 306 x: 〈1;#T〉 307 } 308 #T: { 309 in: 〈0;x〉 310 x: _ 311 } 312 } 313 issue3571: { 314 a: 〈0;#T〉 315 a: { 316 in: { 317 f: true 318 } 319 } 320 a: { 321 #in: { 322 g: 〈2;#T〉 323 g: { 324 #in: { 325 f: 〈4;#T〉 326 } 327 } 328 g: { 329 #in: { 330 f: { 331 #in: { 332 x: true 333 } 334 } 335 } 336 } 337 f?: _ 338 } 339 } 340 #T: { 341 in: 〈0;#in〉 342 #in: _ 343 } 344 } 345 }