1-- in.cue --
2a1: {
3 f: [f]
4}
5
6a2: {
7 f: f
8}
9
10a3: {
11 f: {g: f}
12}
13
14a4: {
15 a: [a | int]
16}
17
18a5: {
19 a: b: a | int
20}
21
22a6: {
23 a: a | int
24}
25
26a7: {
27 a: c.x
28 b: {
29 x: c
30 y: "foo"
31 }
32 c: {
33 x: b.y
34 y: 3
35 }
36}
37
38b1: {
39 b: a & [1]
40 a: [a | int]
41}
42
43b2: {
44 a: [a | int]
45 b: a & [1]
46}
47
48b3: {
49 x: a: [a | int]
50 b: x & {a: [1]}
51}
52
53b4: {
54 b: x.y & [1]
55 x: y: [y]
56}
57
58// Ensure that the cycle error is not blindly copied to a referring field,
59// as the cycle may not persist.
60b4: cond1: {
61 b: x.y & { _z: false, [1] }
62 x: y: {
63 _z: *true | bool
64 if _z {
65 [y]
66 }
67 }
68}
69
70// This reports a structural cycle at b4.cond2.b, because the value it refers
71// has a structural cycle. Technically, this is incorrect, as the cycle
72// really only occurs in b4.cond2.x.y. But since structural cycles are
73// permanent, the entire configuration is invalidated, so the spurious
74// additional cycle is merely cosmetic. By most logical standards, one can prove
75// any fact from a contradiction. So assuming that, this is not incorrect.
76// TODO: fix this cosmetic blemish.
77b4: cond2: {
78 x: y: {
79 _z: *true | bool
80 if _z {
81 [y]
82 }
83 }
84 b: x.y & { _z: false, [1] }
85}
86
87b5: {
88 b: x.y & {a: [1]}
89 x: y: a: [a | int]
90}
91
92b6: {
93 b: x & {a: [1]}
94 x: a: [a]
95}
96
97b7: {
98 b: a & [[1]]
99 a: [a]
100}
101
102// Issue #555
103b8: {
104 x: a
105 a: f: b
106 b: a | string
107}
108
109// Issue #555
110b9: {
111 #a: string | #b | #ref
112 #b: {
113 c: [#a, #a, #a]
114 }
115 #ref: ref: string
116 x: #b | #ref
117}
118
119// Issue #534
120// TODO: the resolution here is arguably incorrect: c should be
121// d: string | { b: string }
122// However, this is not the end of the world, as the disjunction is preserved
123// under the hood and still unifies with extended structure.
124b10: {
125 a: close({
126 b: string | a | c
127 })
128 c: close({
129 d: string | a
130 })
131
132 d: d: b: string
133}
134
135// Issue #509 -- with comprehension
136b11: {
137 #list: {
138 tail: #list | *null
139 if tail != null {
140 }
141 }
142}
143
144// Issue #509 -- with comprehension
145b12: {
146 #list: {
147 V=value: int
148 T=tail: #list | *null
149 if T != null {
150 sum: V + T.sum
151 }
152 if T == null {
153 sum: V
154 }
155 }
156
157 list1: #list
158 list1: {
159 value: 1
160 tail: {
161 value: 2
162 tail: {
163 value: 3
164 tail: {
165 value: 4
166 }
167 }
168 }
169 }
170}
171
172// More trigger happy on stack overflows.
173b12b: {
174 #list: {
175 tail: #list
176
177 if tail != null {
178 sum: tail.sum
179 }
180 }
181
182 list1: #list
183 list1: {
184 tail: {
185 tail: {
186 }
187 }
188 }
189}
190
191// Issue #587
192b13: root: a: [for x in root {x}]
193
194// Issue #587
195// TODO: this should probably be okay if we allow shallow evaluation of
196// comprehension sources. See #1881.
197b14: {
198 root: {
199 a: [...int]
200
201 for x in a {
202 "\(x)": {}
203 }
204
205 b: [for x in root {x}]
206 }
207}
208
209// This is okay
210// Issue #587
211b15: root: a: {for x in root {x}}
212
213// Issue #502 -- unused bulk constraints are not cyclic
214p1: {
215 #T: {
216 a: [string]: link: #T
217 }
218
219 a: #T & {
220 a: one: link: a: two: {}
221 }
222}
223
224// Issue #502 -- but they are if it is invoked within the struct.
225p2: {
226 #T: {
227 a: [string]: link: #T
228 a: b: {}
229 }
230
231 a: #T & {
232 a: one: link: a: two: {}
233 }
234}
235
236// Issue #502 -- or added later.
237p3: {
238 #S: #T: {
239 a: [string]: link: #T
240 }
241
242 #U: {
243 #S
244 #T: a: b: {}
245 }
246
247 a: #U.#T & {
248 a: one: link: a: two: {}
249 }
250}
251
252// Issue #502 -- unused bulk constraints are not cyclic
253p4: {
254 #T: {
255 a: [...{link: #T}]
256 }
257
258 a: #T & {
259 a: [{link: a: [{}]}]
260 }
261}
262
263// Issue #502 -- but they are if it is invoked within the struct.
264p5: {
265 #T: {
266 a: [...{link: #T}]
267 a: [{}]
268 }
269
270 a: #T & {
271 a: [{link: a: [{}]}]
272 }
273}
274
275// Issue #502 -- or added later.
276p6: {
277 #S: #T: {
278 a: [...{link: #T}]
279 }
280
281 #U: {
282 #S
283 #T: a: [{}]
284 }
285
286 a: #U.#T & {
287 a: [{link: a: [{}]}]
288 }
289}
290
291c1: {
292 a: {
293 b: {}
294 c: a & b
295 }
296}
297
298// indirection
299d1: {
300 a: b: c: d: {h: int, t: r}
301 r: a.b
302
303 x: a.b.c
304}
305
306d2: {
307 x: a.b.c
308
309 r: a.b
310 a: b: c: d: {h: int, t: r}
311}
312
313d3: {
314 config: {
315 a: b: c: indirect
316 indirect: [a.b, null][i]
317 i: int | *1
318 }
319 x: config & {i: 0}
320}
321
322// Ensure that the cycles here fail early.
323// TODO: they can still be shorter.
324shortPathFail: _
325
326shortPathFail: doubleRef: {
327 // Avoid this: the first #List reference is different from the second, so
328 // the second #List reference counts as a first occurrence, causing the
329 // result to be longer than perhaps expected.
330 a: #List
331 #List: Next: #List | *null
332}
333
334shortPathFail: elipsis: {
335 // Avoid this: the elipsis causes `_` to be mixed in with the #Foo
336 // reference, causing the first cycle to be discounted.
337 t1: {
338 #Foo: ref: null | #Foo
339 #Foo: { ... }
340 }
341 t2: {
342 Foo: ref: Foo
343 Foo: {...}
344 }
345}
346
347patternFail: issue2374: {
348 r=[string]: {b: r}
349 a: {r: 0}
350}
351
352shortPathFail: comprehension: {
353 #list: {
354 tail: #list | *null
355 if tail != null {
356 }
357 }
358}
359
360withLetFail: {
361 schema: next: _schema_1
362 let _schema_1 = schema
363}
364
365listOptOK: {
366 list: {
367 head: int
368 tail?: list
369 }
370 a: list & {head: 3, tail: head: 2}
371}
372
373// combining structural with reference cycles
374e1: {
375 a: a
376 a: c: a
377
378 b: c: b
379 b: b
380}
381
382e2: {
383 a: {a}
384 a: c: a
385
386 b: c: b
387 b: {b}
388}
389
390e3: {
391 a: [a]
392 a: c: a
393
394 b: [b]
395 b: c: b
396}
397
398e4: {
399 a: [a | {}]
400 a: [[{c: 1}]]
401
402 b: [[{c: 1}]]
403 b: [b | {}]
404}
405
406e5: {
407 a: c: a | int
408 a: a | int
409
410 b: b | int
411 b: c: b | int
412}
413
414// validating values
415nestedList: {
416 v1e: {
417 x: [x | int, 1]
418 y: x & [[[2], 1], 1]
419 }
420
421 v2e: {
422 y: x & [[[2], 1], 1]
423 x: [x | int, 1]
424 }
425
426 v1: {
427 x: [x | int, 1]
428 y: x & [[[2, 1], 1], 1]
429 }
430
431 v2: {
432 y: x & [[[2, 1], 1], 1]
433 x: [x | int, 1]
434 }
435}
436
437v3: {
438 list: {
439 head: int
440 tail: list | null
441 }
442
443 myList: list
444 myList: {
445 head: 2
446 tail: {
447 head: 3
448 tail: {
449 head: 4
450 }
451 }
452 }
453}
454
455v4: {
456 list: {
457 head: int
458 tail: list | 1
459 }
460
461 myList: list
462 myList: {
463 head: 2
464 tail: head: 3
465 }
466}
467
468v5: {
469 list: {
470 head: int
471 tail: list | {}
472 }
473
474 myList: list
475 myList: {
476 head: 2
477 tail: head: 3
478 }
479}
480
481// Example from "The Logic of Type Feature Structures" (Bob Carpenter)/
482z1: {
483 y: {
484 f: h: g
485 g: _
486 }
487 x: {
488 f: _
489 g: f
490 }
491 z: x & y
492}
493
494// Cross references. Here there is no cycle, but the repeated instantiations
495// of T will cause, in turn, cause repeated resolution of `x`. The algorithm
496// should not identify these as cyclic references. Instead, it should be
497// noted that the reference is each time referring to new content.
498// Issue #754
499crossRefNoCycle: t1: {
500 T: {
501 x: _
502 y: x
503 }
504 C: { x: T } & T
505}
506
507crossRefNoCycle: t2: {
508 T: {
509 x: _
510 y: x
511 }
512 C: T & { x: T }
513}
514
515crossRefNoCycle: t3: {
516 T: {
517 x: _
518 y: x
519 z: y
520 }
521 C: T & { x: T }
522}
523
524crossRefNoCycle: t4: {
525 T: {
526 x: _
527 y: x
528 z: y
529 }
530 C: T & { x: T & { x: T } }
531}
532
533// Ensure these are NOT treated as structural errors.
534
535n1: a: b: int
536n2: n1 & {a: n1}
537n3: n1 & {n1}
538n4: n1 & {x: n1 & {y: n1 & {z: int}}}
539-- out/eval/stats --
540Leaks: 15
541Freed: 800
542Reused: 788
543Allocs: 27
544Retain: 61
545
546Unifications: 629
547Conjuncts: 1224
548Disjuncts: 847
549-- out/eval --
550Errors:
551a1.f.0: structural cycle
552a3.f.g: structural cycle
553b12b.#list.tail: structural cycle
554b13.root.a.0.0: structural cycle
555b14.root.b.1.1: structural cycle
556b4.cond1.x.y.0: structural cycle
557b4.cond2.x.y.0: structural cycle
558b4.x.y.0: structural cycle
559b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
560 ./in.cue:92:5
561 ./in.cue:92:13
562 ./in.cue:92:14
563 ./in.cue:93:9
564b6.b.a.0.0: structural cycle
565b6.x.a.0: structural cycle
566b7.a.0: structural cycle
567c1.a.c.c: structural cycle
568d1.a.b.c.d.t: structural cycle
569d2.a.b.c.d.t: structural cycle
570d2.r.c.d.t: structural cycle
571d3.x.a.b.c: structural cycle
572e1.a.c: structural cycle
573e1.b.c: structural cycle
574e2.a.c: structural cycle
575e2.b.c: structural cycle
576e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
577 ./in.cue:390:5
578 ./in.cue:391:5
579e3.a.c: structural cycle
580e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
581 ./in.cue:393:5
582 ./in.cue:394:5
583e3.b.c: structural cycle
584e4.a.0: 4 errors in empty disjunction:
585e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
586 ./in.cue:398:10
587 ./in.cue:399:6
588e4.a.0.0: 2 errors in empty disjunction:
589e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
590 ./in.cue:399:5
591 ./in.cue:399:7
592e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
593 ./in.cue:398:6
594 ./in.cue:398:10
595 ./in.cue:399:6
596e4.b.0: 4 errors in empty disjunction:
597e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
598 ./in.cue:401:6
599 ./in.cue:402:10
600e4.b.0.0: 2 errors in empty disjunction:
601e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
602 ./in.cue:401:7
603 ./in.cue:402:5
604e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
605 ./in.cue:401:6
606 ./in.cue:402:6
607 ./in.cue:402:10
608nestedList.v1e.y.0: 4 errors in empty disjunction:
609nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
610 ./in.cue:416:11
611 ./in.cue:417:11
612nestedList.v1e.y.0.0: 2 errors in empty disjunction:
613nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
614 ./in.cue:416:11
615 ./in.cue:417:12
616nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
617nestedList.v2e.y.0: 4 errors in empty disjunction:
618nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
619 ./in.cue:421:11
620 ./in.cue:422:11
621nestedList.v2e.y.0.0: 2 errors in empty disjunction:
622nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
623 ./in.cue:421:12
624 ./in.cue:422:11
625nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
626p2.#T.a.b.link: structural cycle
627p3.#U.#T.a.b.link: structural cycle
628p5.#T.a.0.link: structural cycle
629p6.#U.#T.a.0.link: structural cycle
630patternFail.issue2374.a.b: structural cycle
631shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
632withLetFail.schema.next: structural cycle
633z1.z.f.h: structural cycle
634z1.z.g.h: structural cycle
635d1.r: structural cycle:
636 ./in.cue:299:26
637d3.x.indirect: structural cycle:
638 ./in.cue:314:12
639
640Result:
641(_|_){
642 // [eval]
643 a1: (_|_){
644 // [structural cycle]
645 f: (_|_){
646 // [structural cycle]
647 0: (_|_){
648 // [structural cycle] a1.f.0: structural cycle
649 }
650 }
651 }
652 a2: (struct){
653 f: (_){ _ }
654 }
655 a3: (_|_){
656 // [structural cycle]
657 f: (_|_){
658 // [structural cycle]
659 g: (_|_){
660 // [structural cycle] a3.f.g: structural cycle
661 }
662 }
663 }
664 a4: (struct){
665 a: (#list){
666 0: (int){ int }
667 }
668 }
669 a5: (struct){
670 a: (struct){
671 b: (int){ int }
672 }
673 }
674 a6: (struct){
675 a: (_){ |((_){ _ }, (int){ int }) }
676 }
677 a7: (struct){
678 a: (string){ "foo" }
679 b: (struct){
680 x: (struct){
681 x: (string){ "foo" }
682 y: (int){ 3 }
683 }
684 y: (string){ "foo" }
685 }
686 c: (struct){
687 x: (string){ "foo" }
688 y: (int){ 3 }
689 }
690 }
691 b1: (struct){
692 b: (#list){
693 0: (int){ 1 }
694 }
695 a: (#list){
696 0: (int){ int }
697 }
698 }
699 b2: (struct){
700 a: (#list){
701 0: (int){ int }
702 }
703 b: (#list){
704 0: (int){ 1 }
705 }
706 }
707 b3: (struct){
708 x: (struct){
709 a: (#list){
710 0: (int){ int }
711 }
712 }
713 b: (struct){
714 a: (#list){
715 0: (int){ 1 }
716 }
717 }
718 }
719 b4: (_|_){
720 // [structural cycle]
721 b: (_|_){
722 // [structural cycle]
723 0: (_|_){
724 // [structural cycle] b4.x.y.0: structural cycle
725 }
726 }
727 x: (_|_){
728 // [structural cycle]
729 y: (_|_){
730 // [structural cycle]
731 0: (_|_){
732 // [structural cycle] b4.x.y.0: structural cycle
733 }
734 }
735 }
736 cond1: (_|_){
737 // [structural cycle]
738 b: (#list){
739 _z: (bool){ false }
740 0: (int){ 1 }
741 }
742 x: (_|_){
743 // [structural cycle]
744 y: (_|_){
745 // [structural cycle]
746 _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
747 0: (_|_){
748 // [structural cycle] b4.cond1.x.y.0: structural cycle
749 }
750 }
751 }
752 }
753 cond2: (_|_){
754 // [structural cycle]
755 x: (_|_){
756 // [structural cycle]
757 y: (_|_){
758 // [structural cycle]
759 _z: (bool){ |(*(bool){ true }, (bool){ bool }) }
760 0: (_|_){
761 // [structural cycle] b4.cond2.x.y.0: structural cycle
762 }
763 }
764 }
765 b: (_|_){
766 // [structural cycle] b4.cond2.x.y.0: structural cycle
767 _z: (bool){ false }
768 0: (int){ 1 }
769 }
770 }
771 }
772 b5: (struct){
773 b: (struct){
774 a: (#list){
775 0: (int){ 1 }
776 }
777 }
778 x: (struct){
779 y: (struct){
780 a: (#list){
781 0: (int){ int }
782 }
783 }
784 }
785 }
786 b6: (_|_){
787 // [eval]
788 b: (_|_){
789 // [eval]
790 a: (_|_){
791 // [eval]
792 0: (_|_){
793 // [eval] b6.b.a.0: conflicting values 1 and [1] (mismatched types int and list):
794 // ./in.cue:92:5
795 // ./in.cue:92:13
796 // ./in.cue:92:14
797 // ./in.cue:93:9
798 0: (_|_){
799 // [structural cycle] b6.b.a.0.0: structural cycle
800 }
801 }
802 }
803 }
804 x: (_|_){
805 // [structural cycle]
806 a: (_|_){
807 // [structural cycle]
808 0: (_|_){
809 // [structural cycle] b6.x.a.0: structural cycle
810 }
811 }
812 }
813 }
814 b7: (_|_){
815 // [structural cycle]
816 b: (_|_){
817 // [structural cycle]
818 0: (_|_){
819 // [structural cycle] b7.a.0: structural cycle
820 0: (int){ 1 }
821 }
822 }
823 a: (_|_){
824 // [structural cycle]
825 0: (_|_){
826 // [structural cycle] b7.a.0: structural cycle
827 }
828 }
829 }
830 b8: (struct){
831 x: (struct){
832 f: (string){ string }
833 }
834 a: (struct){
835 f: (string){ string }
836 }
837 b: (string){ string }
838 }
839 b9: (struct){
840 #a: ((string|struct)){ |((string){ string }, (#struct){
841 ref: (string){ string }
842 }) }
843 #b: (#struct){
844 c: (#list){
845 0: ((string|struct)){ |((string){ string }, (#struct){
846 ref: (string){ string }
847 }) }
848 1: ((string|struct)){ |((string){ string }, (#struct){
849 ref: (string){ string }
850 }) }
851 2: ((string|struct)){ |((string){ string }, (#struct){
852 ref: (string){ string }
853 }) }
854 }
855 }
856 #ref: (#struct){
857 ref: (string){ string }
858 }
859 x: (#struct){ |((#struct){
860 c: (#list){
861 0: ((string|struct)){ |((string){ string }, (#struct){
862 ref: (string){ string }
863 }) }
864 1: ((string|struct)){ |((string){ string }, (#struct){
865 ref: (string){ string }
866 }) }
867 2: ((string|struct)){ |((string){ string }, (#struct){
868 ref: (string){ string }
869 }) }
870 }
871 }, (#struct){
872 ref: (string){ string }
873 }) }
874 }
875 b10: (struct){
876 a: (#struct){
877 b: ((string|struct)){ |((string){ string }, (#struct){
878 d: (string){ string }
879 }) }
880 }
881 c: (#struct){
882 d: (string){ string }
883 }
884 d: (struct){
885 d: (struct){
886 b: (string){ string }
887 }
888 }
889 }
890 b11: (struct){
891 #list: (#struct){
892 tail: ((null|struct)){ |(*(null){ null }, (#struct){
893 tail: (null){ null }
894 }) }
895 }
896 }
897 b12: (struct){
898 #list: (#struct){
899 value: (int){ int }
900 tail: (null){ null }
901 sum: (int){ int }
902 }
903 list1: (#struct){
904 value: (int){ 1 }
905 tail: (#struct){
906 value: (int){ 2 }
907 tail: (#struct){
908 value: (int){ 3 }
909 tail: (#struct){
910 value: (int){ 4 }
911 tail: (null){ null }
912 sum: (int){ 4 }
913 }
914 sum: (int){ 7 }
915 }
916 sum: (int){ 9 }
917 }
918 sum: (int){ 10 }
919 }
920 }
921 b12b: (_|_){
922 // [structural cycle]
923 #list: (_|_){
924 // [structural cycle] b12b.#list.tail: structural cycle
925 tail: (_|_){
926 // [structural cycle] b12b.#list.tail: structural cycle
927 }
928 }
929 list1: (_|_){
930 // [structural cycle] b12b.#list.tail: structural cycle
931 tail: (struct){
932 tail: (struct){
933 }
934 }
935 }
936 }
937 b13: (_|_){
938 // [structural cycle]
939 root: (_|_){
940 // [structural cycle]
941 a: (_|_){
942 // [structural cycle]
943 0: (_|_){
944 // [structural cycle]
945 0: (_|_){
946 // [structural cycle] b13.root.a.0.0: structural cycle
947 }
948 }
949 }
950 }
951 }
952 b14: (_|_){
953 // [structural cycle]
954 root: (_|_){
955 // [structural cycle]
956 a: (list){
957 }
958 b: (_|_){
959 // [structural cycle]
960 0: (list){
961 }
962 1: (_|_){
963 // [structural cycle]
964 0: (list){
965 }
966 1: (_|_){
967 // [structural cycle] b14.root.b.1.1: structural cycle
968 }
969 }
970 }
971 }
972 }
973 b15: (struct){
974 root: (struct){
975 a: (struct){
976 }
977 }
978 }
979 p1: (struct){
980 #T: (#struct){
981 a: (#struct){
982 }
983 }
984 a: (#struct){
985 a: (#struct){
986 one: (#struct){
987 link: (#struct){
988 a: (#struct){
989 two: (#struct){
990 link: (#struct){
991 a: (#struct){
992 }
993 }
994 }
995 }
996 }
997 }
998 }
999 }
1000 }
1001 p2: (_|_){
1002 // [structural cycle]
1003 #T: (_|_){
1004 // [structural cycle]
1005 a: (_|_){
1006 // [structural cycle]
1007 b: (_|_){
1008 // [structural cycle]
1009 link: (_|_){
1010 // [structural cycle] p2.#T.a.b.link: structural cycle
1011 }
1012 }
1013 }
1014 }
1015 a: (_|_){
1016 // [structural cycle]
1017 a: (struct){
1018 one: (struct){
1019 link: (struct){
1020 a: (struct){
1021 two: (struct){
1022 }
1023 }
1024 }
1025 }
1026 }
1027 }
1028 }
1029 p3: (_|_){
1030 // [structural cycle]
1031 #S: (#struct){
1032 #T: (#struct){
1033 a: (#struct){
1034 }
1035 }
1036 }
1037 #U: (_|_){
1038 // [structural cycle]
1039 #T: (_|_){
1040 // [structural cycle]
1041 a: (_|_){
1042 // [structural cycle]
1043 b: (_|_){
1044 // [structural cycle]
1045 link: (_|_){
1046 // [structural cycle] p3.#U.#T.a.b.link: structural cycle
1047 }
1048 }
1049 }
1050 }
1051 }
1052 a: (_|_){
1053 // [structural cycle] p3.#U.#T.a.b.link: structural cycle
1054 a: (struct){
1055 one: (struct){
1056 link: (struct){
1057 a: (struct){
1058 two: (struct){
1059 }
1060 }
1061 }
1062 }
1063 }
1064 }
1065 }
1066 p4: (struct){
1067 #T: (#struct){
1068 a: (list){
1069 }
1070 }
1071 a: (#struct){
1072 a: (#list){
1073 0: (#struct){
1074 link: (#struct){
1075 a: (#list){
1076 0: (#struct){
1077 link: (#struct){
1078 a: (list){
1079 }
1080 }
1081 }
1082 }
1083 }
1084 }
1085 }
1086 }
1087 }
1088 p5: (_|_){
1089 // [structural cycle]
1090 #T: (_|_){
1091 // [structural cycle]
1092 a: (_|_){
1093 // [structural cycle]
1094 0: (_|_){
1095 // [structural cycle]
1096 link: (_|_){
1097 // [structural cycle] p5.#T.a.0.link: structural cycle
1098 }
1099 }
1100 }
1101 }
1102 a: (_|_){
1103 // [structural cycle]
1104 a: (#list){
1105 0: (struct){
1106 link: (struct){
1107 a: (#list){
1108 0: (struct){
1109 }
1110 }
1111 }
1112 }
1113 }
1114 }
1115 }
1116 p6: (_|_){
1117 // [structural cycle]
1118 #S: (#struct){
1119 #T: (#struct){
1120 a: (list){
1121 }
1122 }
1123 }
1124 #U: (_|_){
1125 // [structural cycle]
1126 #T: (_|_){
1127 // [structural cycle]
1128 a: (_|_){
1129 // [structural cycle]
1130 0: (_|_){
1131 // [structural cycle]
1132 link: (_|_){
1133 // [structural cycle] p6.#U.#T.a.0.link: structural cycle
1134 }
1135 }
1136 }
1137 }
1138 }
1139 a: (_|_){
1140 // [structural cycle] p6.#U.#T.a.0.link: structural cycle
1141 a: (#list){
1142 0: (struct){
1143 link: (struct){
1144 a: (#list){
1145 0: (struct){
1146 }
1147 }
1148 }
1149 }
1150 }
1151 }
1152 }
1153 c1: (_|_){
1154 // [structural cycle]
1155 a: (_|_){
1156 // [structural cycle]
1157 b: (struct){
1158 }
1159 c: (_|_){
1160 // [structural cycle]
1161 b: (struct){
1162 }
1163 c: (_|_){
1164 // [structural cycle] c1.a.c.c: structural cycle
1165 }
1166 }
1167 }
1168 }
1169 d1: (_|_){
1170 // [structural cycle]
1171 a: (_|_){
1172 // [structural cycle]
1173 b: (_|_){
1174 // [structural cycle]
1175 c: (_|_){
1176 // [structural cycle]
1177 d: (_|_){
1178 // [structural cycle]
1179 h: (int){ int }
1180 t: (_|_){
1181 // [structural cycle] d1.a.b.c.d.t: structural cycle
1182 }
1183 }
1184 }
1185 }
1186 }
1187 r: (_|_){
1188 // [structural cycle] d1.r: structural cycle:
1189 // ./in.cue:299:26
1190 }
1191 x: (_|_){
1192 // [structural cycle] d1.a.b.c.d.t: structural cycle
1193 }
1194 }
1195 d2: (_|_){
1196 // [structural cycle]
1197 x: (_|_){
1198 // [structural cycle]
1199 d: (_|_){
1200 // [structural cycle]
1201 h: (int){ int }
1202 t: (_|_){
1203 // [structural cycle]
1204 }
1205 }
1206 }
1207 r: (_|_){
1208 // [structural cycle]
1209 c: (_|_){
1210 // [structural cycle]
1211 d: (_|_){
1212 // [structural cycle]
1213 h: (int){ int }
1214 t: (_|_){
1215 // [structural cycle] d2.r.c.d.t: structural cycle
1216 }
1217 }
1218 }
1219 }
1220 a: (struct){
1221 b: (struct){
1222 c: (_|_){
1223 // [structural cycle]
1224 d: (_|_){
1225 // [structural cycle]
1226 h: (int){ int }
1227 t: (_|_){
1228 // [structural cycle] d2.a.b.c.d.t: structural cycle
1229 }
1230 }
1231 }
1232 }
1233 }
1234 }
1235 d3: (_|_){
1236 // [structural cycle]
1237 config: (struct){
1238 a: (struct){
1239 b: (struct){
1240 c: (null){ null }
1241 }
1242 }
1243 indirect: (null){ null }
1244 i: (int){ |(*(int){ 1 }, (int){ int }) }
1245 }
1246 x: (_|_){
1247 // [structural cycle]
1248 a: (_|_){
1249 // [structural cycle]
1250 b: (_|_){
1251 // [structural cycle]
1252 c: (_|_){
1253 // [structural cycle] d3.x.a.b.c: structural cycle
1254 }
1255 }
1256 }
1257 indirect: (_|_){
1258 // [structural cycle] d3.x.indirect: structural cycle:
1259 // ./in.cue:314:12
1260 }
1261 i: (int){ 0 }
1262 }
1263 }
1264 shortPathFail: (_|_){
1265 // [structural cycle]
1266 doubleRef: (struct){
1267 a: (#struct){
1268 Next: (null){ null }
1269 }
1270 #List: (#struct){
1271 Next: (null){ null }
1272 }
1273 }
1274 elipsis: (_|_){
1275 // [structural cycle]
1276 t1: (struct){
1277 #Foo: (#struct){
1278 ref: ((null|struct)){ |((null){ null }, (#struct){
1279 ref: (null){ null }
1280 }) }
1281 }
1282 }
1283 t2: (_|_){
1284 // [structural cycle]
1285 Foo: (_|_){
1286 // [structural cycle]
1287 ref: (_|_){
1288 // [structural cycle]
1289 ref: (_|_){
1290 // [structural cycle] shortPathFail.elipsis.t2.Foo.ref.ref: structural cycle
1291 }
1292 }
1293 }
1294 }
1295 }
1296 comprehension: (struct){
1297 #list: (#struct){
1298 tail: ((null|struct)){ |(*(null){ null }, (#struct){
1299 tail: (null){ null }
1300 }) }
1301 }
1302 }
1303 }
1304 patternFail: (_|_){
1305 // [structural cycle]
1306 issue2374: (_|_){
1307 // [structural cycle]
1308 a: (_|_){
1309 // [structural cycle]
1310 r: (int){ 0 }
1311 b: (_|_){
1312 // [structural cycle] patternFail.issue2374.a.b: structural cycle
1313 }
1314 }
1315 }
1316 }
1317 withLetFail: (_|_){
1318 // [structural cycle]
1319 schema: (_|_){
1320 // [structural cycle]
1321 next: (_|_){
1322 // [structural cycle] withLetFail.schema.next: structural cycle
1323 }
1324 }
1325 let _schema_1#1 = (_|_){
1326 // [structural cycle] withLetFail._schema_1: structural cycle:
1327 // ./in.cue:360:17
1328 }
1329 }
1330 listOptOK: (struct){
1331 list: (struct){
1332 head: (int){ int }
1333 tail?: (_|_){
1334 // [structural cycle] listOptOK.list.tail: structural cycle
1335 }
1336 }
1337 a: (struct){
1338 head: (int){ 3 }
1339 tail: (struct){
1340 head: (int){ 2 }
1341 tail?: (_|_){
1342 // [structural cycle] listOptOK.a.tail.tail: structural cycle
1343 }
1344 }
1345 }
1346 }
1347 e1: (_|_){
1348 // [structural cycle]
1349 a: (_|_){
1350 // [structural cycle]
1351 c: (_|_){
1352 // [structural cycle] e1.a.c: structural cycle
1353 }
1354 }
1355 b: (_|_){
1356 // [structural cycle]
1357 c: (_|_){
1358 // [structural cycle] e1.b.c: structural cycle
1359 }
1360 }
1361 }
1362 e2: (_|_){
1363 // [structural cycle]
1364 a: (_|_){
1365 // [structural cycle]
1366 c: (_|_){
1367 // [structural cycle] e2.a.c: structural cycle
1368 }
1369 }
1370 b: (_|_){
1371 // [structural cycle]
1372 c: (_|_){
1373 // [structural cycle] e2.b.c: structural cycle
1374 }
1375 }
1376 }
1377 e3: (_|_){
1378 // [eval]
1379 a: (_|_){
1380 // [eval] e3.a: conflicting values [a] and {c:a} (mismatched types list and struct):
1381 // ./in.cue:390:5
1382 // ./in.cue:391:5
1383 c: (_|_){
1384 // [structural cycle] e3.a.c: structural cycle
1385 }
1386 0: (_|_){
1387 // [structural cycle] e3.a.c: structural cycle
1388 }
1389 }
1390 b: (_|_){
1391 // [eval] e3.b: conflicting values [b] and {c:b} (mismatched types list and struct):
1392 // ./in.cue:393:5
1393 // ./in.cue:394:5
1394 c: (_|_){
1395 // [structural cycle] e3.b.c: structural cycle
1396 }
1397 0: (_|_){
1398 // [structural cycle] e3.b.c: structural cycle
1399 }
1400 }
1401 }
1402 e4: (_|_){
1403 // [eval]
1404 a: (_|_){
1405 // [eval]
1406 0: (_|_){
1407 // [eval] e4.a.0: 4 errors in empty disjunction:
1408 // e4.a.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
1409 // ./in.cue:398:10
1410 // ./in.cue:399:6
1411 // e4.a.0.0: 2 errors in empty disjunction:
1412 // e4.a.0.0: conflicting values [[{c:1}]] and {c:1} (mismatched types list and struct):
1413 // ./in.cue:399:5
1414 // ./in.cue:399:7
1415 // e4.a.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
1416 // ./in.cue:398:6
1417 // ./in.cue:398:10
1418 // ./in.cue:399:6
1419 0: (struct){
1420 c: (int){ 1 }
1421 }
1422 }
1423 }
1424 b: (_|_){
1425 // [eval]
1426 0: (_|_){
1427 // [eval] e4.b.0: 4 errors in empty disjunction:
1428 // e4.b.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
1429 // ./in.cue:401:6
1430 // ./in.cue:402:10
1431 // e4.b.0.0: 2 errors in empty disjunction:
1432 // e4.b.0.0: conflicting values [(b|{})] and {c:1} (mismatched types list and struct):
1433 // ./in.cue:401:7
1434 // ./in.cue:402:5
1435 // e4.b.0.0: conflicting values [{c:1}] and {} (mismatched types list and struct):
1436 // ./in.cue:401:6
1437 // ./in.cue:402:6
1438 // ./in.cue:402:10
1439 0: (struct){
1440 c: (int){ 1 }
1441 }
1442 }
1443 }
1444 }
1445 e5: (struct){
1446 a: (struct){
1447 c: (int){ int }
1448 }
1449 b: (struct){
1450 c: (int){ int }
1451 }
1452 }
1453 nestedList: (_|_){
1454 // [eval]
1455 v1e: (_|_){
1456 // [eval]
1457 x: (#list){
1458 0: (int){ int }
1459 1: (int){ 1 }
1460 }
1461 y: (_|_){
1462 // [eval]
1463 0: (_|_){
1464 // [eval] nestedList.v1e.y.0: 4 errors in empty disjunction:
1465 // nestedList.v1e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
1466 // ./in.cue:416:11
1467 // ./in.cue:417:11
1468 // nestedList.v1e.y.0.0: 2 errors in empty disjunction:
1469 // nestedList.v1e.y.0.0: conflicting values int and [2] (mismatched types int and list):
1470 // ./in.cue:416:11
1471 // ./in.cue:417:12
1472 // nestedList.v1e.y.0.0: incompatible list lengths (1 and 2)
1473 0: (#list){
1474 0: (int){ 2 }
1475 }
1476 1: (int){ 1 }
1477 }
1478 1: (int){ 1 }
1479 }
1480 }
1481 v2e: (_|_){
1482 // [eval]
1483 y: (_|_){
1484 // [eval]
1485 0: (_|_){
1486 // [eval] nestedList.v2e.y.0: 4 errors in empty disjunction:
1487 // nestedList.v2e.y.0: conflicting values int and [[2],1] (mismatched types int and list):
1488 // ./in.cue:421:11
1489 // ./in.cue:422:11
1490 // nestedList.v2e.y.0.0: 2 errors in empty disjunction:
1491 // nestedList.v2e.y.0.0: conflicting values int and [2] (mismatched types int and list):
1492 // ./in.cue:421:12
1493 // ./in.cue:422:11
1494 // nestedList.v2e.y.0.0: incompatible list lengths (1 and 2)
1495 0: (#list){
1496 0: (int){ 2 }
1497 }
1498 1: (int){ 1 }
1499 }
1500 1: (int){ 1 }
1501 }
1502 x: (#list){
1503 0: (int){ int }
1504 1: (int){ 1 }
1505 }
1506 }
1507 v1: (struct){
1508 x: (#list){
1509 0: (int){ int }
1510 1: (int){ 1 }
1511 }
1512 y: (#list){
1513 0: (#list){
1514 0: (#list){
1515 0: (int){ 2 }
1516 1: (int){ 1 }
1517 }
1518 1: (int){ 1 }
1519 }
1520 1: (int){ 1 }
1521 }
1522 }
1523 v2: (struct){
1524 y: (#list){
1525 0: (#list){
1526 0: (#list){
1527 0: (int){ 2 }
1528 1: (int){ 1 }
1529 }
1530 1: (int){ 1 }
1531 }
1532 1: (int){ 1 }
1533 }
1534 x: (#list){
1535 0: (int){ int }
1536 1: (int){ 1 }
1537 }
1538 }
1539 }
1540 v3: (struct){
1541 list: (struct){
1542 head: (int){ int }
1543 tail: (null){ null }
1544 }
1545 myList: (struct){
1546 head: (int){ 2 }
1547 tail: (struct){
1548 head: (int){ 3 }
1549 tail: (struct){
1550 head: (int){ 4 }
1551 tail: (null){ null }
1552 }
1553 }
1554 }
1555 }
1556 v4: (struct){
1557 list: (struct){
1558 head: (int){ int }
1559 tail: (int){ 1 }
1560 }
1561 myList: (struct){
1562 head: (int){ 2 }
1563 tail: (struct){
1564 head: (int){ 3 }
1565 tail: (int){ 1 }
1566 }
1567 }
1568 }
1569 v5: (struct){
1570 list: (struct){
1571 head: (int){ int }
1572 tail: (struct){
1573 }
1574 }
1575 myList: (struct){
1576 head: (int){ 2 }
1577 tail: (struct){ |((struct){
1578 head: (int){ 3 }
1579 tail: (struct){
1580 }
1581 }, (struct){
1582 head: (int){ 3 }
1583 }) }
1584 }
1585 }
1586 z1: (_|_){
1587 // [structural cycle]
1588 y: (struct){
1589 f: (struct){
1590 h: (_){ _ }
1591 }
1592 g: (_){ _ }
1593 }
1594 x: (struct){
1595 f: (_){ _ }
1596 g: (_){ _ }
1597 }
1598 z: (_|_){
1599 // [structural cycle]
1600 f: (_|_){
1601 // [structural cycle]
1602 h: (_|_){
1603 // [structural cycle] z1.z.f.h: structural cycle
1604 }
1605 }
1606 g: (_|_){
1607 // [structural cycle]
1608 h: (_|_){
1609 // [structural cycle] z1.z.g.h: structural cycle
1610 }
1611 }
1612 }
1613 }
1614 crossRefNoCycle: (struct){
1615 t1: (struct){
1616 T: (struct){
1617 x: (_){ _ }
1618 y: (_){ _ }
1619 }
1620 C: (struct){
1621 x: (struct){
1622 x: (_){ _ }
1623 y: (_){ _ }
1624 }
1625 y: (struct){
1626 x: (_){ _ }
1627 y: (_){ _ }
1628 }
1629 }
1630 }
1631 t2: (struct){
1632 T: (struct){
1633 x: (_){ _ }
1634 y: (_){ _ }
1635 }
1636 C: (struct){
1637 x: (struct){
1638 x: (_){ _ }
1639 y: (_){ _ }
1640 }
1641 y: (struct){
1642 x: (_){ _ }
1643 y: (_){ _ }
1644 }
1645 }
1646 }
1647 t3: (struct){
1648 T: (struct){
1649 x: (_){ _ }
1650 y: (_){ _ }
1651 z: (_){ _ }
1652 }
1653 C: (struct){
1654 x: (struct){
1655 x: (_){ _ }
1656 y: (_){ _ }
1657 z: (_){ _ }
1658 }
1659 y: (struct){
1660 x: (_){ _ }
1661 y: (_){ _ }
1662 z: (_){ _ }
1663 }
1664 z: (struct){
1665 x: (_){ _ }
1666 y: (_){ _ }
1667 z: (_){ _ }
1668 }
1669 }
1670 }
1671 t4: (struct){
1672 T: (struct){
1673 x: (_){ _ }
1674 y: (_){ _ }
1675 z: (_){ _ }
1676 }
1677 C: (struct){
1678 x: (struct){
1679 x: (struct){
1680 x: (_){ _ }
1681 y: (_){ _ }
1682 z: (_){ _ }
1683 }
1684 y: (struct){
1685 x: (_){ _ }
1686 y: (_){ _ }
1687 z: (_){ _ }
1688 }
1689 z: (struct){
1690 x: (_){ _ }
1691 y: (_){ _ }
1692 z: (_){ _ }
1693 }
1694 }
1695 y: (struct){
1696 x: (struct){
1697 x: (_){ _ }
1698 y: (_){ _ }
1699 z: (_){ _ }
1700 }
1701 y: (struct){
1702 x: (_){ _ }
1703 y: (_){ _ }
1704 z: (_){ _ }
1705 }
1706 z: (struct){
1707 x: (_){ _ }
1708 y: (_){ _ }
1709 z: (_){ _ }
1710 }
1711 }
1712 z: (struct){
1713 x: (struct){
1714 x: (_){ _ }
1715 y: (_){ _ }
1716 z: (_){ _ }
1717 }
1718 y: (struct){
1719 x: (_){ _ }
1720 y: (_){ _ }
1721 z: (_){ _ }
1722 }
1723 z: (struct){
1724 x: (_){ _ }
1725 y: (_){ _ }
1726 z: (_){ _ }
1727 }
1728 }
1729 }
1730 }
1731 }
1732 n1: (struct){
1733 a: (struct){
1734 b: (int){ int }
1735 }
1736 }
1737 n2: (struct){
1738 a: (struct){
1739 b: (int){ int }
1740 a: (struct){
1741 b: (int){ int }
1742 }
1743 }
1744 }
1745 n3: (struct){
1746 a: (struct){
1747 b: (int){ int }
1748 }
1749 }
1750 n4: (struct){
1751 a: (struct){
1752 b: (int){ int }
1753 }
1754 x: (struct){
1755 a: (struct){
1756 b: (int){ int }
1757 }
1758 y: (struct){
1759 a: (struct){
1760 b: (int){ int }
1761 }
1762 z: (int){ int }
1763 }
1764 }
1765 }
1766}
1767-- out/compile --
1768--- in.cue
1769{
1770 a1: {
1771 f: [
1772 〈1;f〉,
1773 ]
1774 }
1775 a2: {
1776 f: 〈0;f〉
1777 }
1778 a3: {
1779 f: {
1780 g: 〈1;f〉
1781 }
1782 }
1783 a4: {
1784 a: [
1785 (〈1;a〉|int),
1786 ]
1787 }
1788 a5: {
1789 a: {
1790 b: (〈1;a〉|int)
1791 }
1792 }
1793 a6: {
1794 a: (〈0;a〉|int)
1795 }
1796 a7: {
1797 a: 〈0;c〉.x
1798 b: {
1799 x: 〈1;c〉
1800 y: "foo"
1801 }
1802 c: {
1803 x: 〈1;b〉.y
1804 y: 3
1805 }
1806 }
1807 b1: {
1808 b: (〈0;a〉 & [
1809 1,
1810 ])
1811 a: [
1812 (〈1;a〉|int),
1813 ]
1814 }
1815 b2: {
1816 a: [
1817 (〈1;a〉|int),
1818 ]
1819 b: (〈0;a〉 & [
1820 1,
1821 ])
1822 }
1823 b3: {
1824 x: {
1825 a: [
1826 (〈1;a〉|int),
1827 ]
1828 }
1829 b: (〈0;x〉 & {
1830 a: [
1831 1,
1832 ]
1833 })
1834 }
1835 b4: {
1836 b: (〈0;x〉.y & [
1837 1,
1838 ])
1839 x: {
1840 y: [
1841 〈1;y〉,
1842 ]
1843 }
1844 }
1845 b4: {
1846 cond1: {
1847 b: (〈0;x〉.y & {
1848 _z: false
1849 [
1850 1,
1851 ]
1852 })
1853 x: {
1854 y: {
1855 _z: (*true|bool)
1856 if 〈0;_z〉 {
1857 [
1858 〈3;y〉,
1859 ]
1860 }
1861 }
1862 }
1863 }
1864 }
1865 b4: {
1866 cond2: {
1867 x: {
1868 y: {
1869 _z: (*true|bool)
1870 if 〈0;_z〉 {
1871 [
1872 〈3;y〉,
1873 ]
1874 }
1875 }
1876 }
1877 b: (〈0;x〉.y & {
1878 _z: false
1879 [
1880 1,
1881 ]
1882 })
1883 }
1884 }
1885 b5: {
1886 b: (〈0;x〉.y & {
1887 a: [
1888 1,
1889 ]
1890 })
1891 x: {
1892 y: {
1893 a: [
1894 (〈1;a〉|int),
1895 ]
1896 }
1897 }
1898 }
1899 b6: {
1900 b: (〈0;x〉 & {
1901 a: [
1902 1,
1903 ]
1904 })
1905 x: {
1906 a: [
1907 〈1;a〉,
1908 ]
1909 }
1910 }
1911 b7: {
1912 b: (〈0;a〉 & [
1913 [
1914 1,
1915 ],
1916 ])
1917 a: [
1918 〈1;a〉,
1919 ]
1920 }
1921 b8: {
1922 x: 〈0;a〉
1923 a: {
1924 f: 〈1;b〉
1925 }
1926 b: (〈0;a〉|string)
1927 }
1928 b9: {
1929 #a: (string|〈0;#b〉|〈0;#ref〉)
1930 #b: {
1931 c: [
1932 〈2;#a〉,
1933 〈2;#a〉,
1934 〈2;#a〉,
1935 ]
1936 }
1937 #ref: {
1938 ref: string
1939 }
1940 x: (〈0;#b〉|〈0;#ref〉)
1941 }
1942 b10: {
1943 a: close({
1944 b: (string|〈1;a〉|〈1;c〉)
1945 })
1946 c: close({
1947 d: (string|〈1;a〉)
1948 })
1949 d: {
1950 d: {
1951 b: string
1952 }
1953 }
1954 }
1955 b11: {
1956 #list: {
1957 tail: (〈1;#list〉|*null)
1958 if (〈0;tail〉 != null) {}
1959 }
1960 }
1961 b12: {
1962 #list: {
1963 value: int
1964 tail: (〈1;#list〉|*null)
1965 if (〈0;tail〉 != null) {
1966 sum: (〈1;value〉 + 〈1;tail〉.sum)
1967 }
1968 if (〈0;tail〉 == null) {
1969 sum: 〈1;value〉
1970 }
1971 }
1972 list1: 〈0;#list〉
1973 list1: {
1974 value: 1
1975 tail: {
1976 value: 2
1977 tail: {
1978 value: 3
1979 tail: {
1980 value: 4
1981 }
1982 }
1983 }
1984 }
1985 }
1986 b12b: {
1987 #list: {
1988 tail: 〈1;#list〉
1989 if (〈0;tail〉 != null) {
1990 sum: 〈1;tail〉.sum
1991 }
1992 }
1993 list1: 〈0;#list〉
1994 list1: {
1995 tail: {
1996 tail: {}
1997 }
1998 }
1999 }
2000 b13: {
2001 root: {
2002 a: [
2003 for _, x in 〈2;root〉 {
2004 〈1;x〉
2005 },
2006 ]
2007 }
2008 }
2009 b14: {
2010 root: {
2011 a: [
2012 ...int,
2013 ]
2014 for _, x in 〈0;a〉 {
2015 "\(〈1;x〉)": {}
2016 }
2017 b: [
2018 for _, x in 〈2;root〉 {
2019 〈1;x〉
2020 },
2021 ]
2022 }
2023 }
2024 b15: {
2025 root: {
2026 a: {
2027 for _, x in 〈2;root〉 {
2028 〈1;x〉
2029 }
2030 }
2031 }
2032 }
2033 p1: {
2034 #T: {
2035 a: {
2036 [string]: {
2037 link: 〈3;#T〉
2038 }
2039 }
2040 }
2041 a: (〈0;#T〉 & {
2042 a: {
2043 one: {
2044 link: {
2045 a: {
2046 two: {}
2047 }
2048 }
2049 }
2050 }
2051 })
2052 }
2053 p2: {
2054 #T: {
2055 a: {
2056 [string]: {
2057 link: 〈3;#T〉
2058 }
2059 }
2060 a: {
2061 b: {}
2062 }
2063 }
2064 a: (〈0;#T〉 & {
2065 a: {
2066 one: {
2067 link: {
2068 a: {
2069 two: {}
2070 }
2071 }
2072 }
2073 }
2074 })
2075 }
2076 p3: {
2077 #S: {
2078 #T: {
2079 a: {
2080 [string]: {
2081 link: 〈3;#T〉
2082 }
2083 }
2084 }
2085 }
2086 #U: {
2087 〈1;#S〉
2088 #T: {
2089 a: {
2090 b: {}
2091 }
2092 }
2093 }
2094 a: (〈0;#U〉.#T & {
2095 a: {
2096 one: {
2097 link: {
2098 a: {
2099 two: {}
2100 }
2101 }
2102 }
2103 }
2104 })
2105 }
2106 p4: {
2107 #T: {
2108 a: [
2109 ...{
2110 link: 〈3;#T〉
2111 },
2112 ]
2113 }
2114 a: (〈0;#T〉 & {
2115 a: [
2116 {
2117 link: {
2118 a: [
2119 {},
2120 ]
2121 }
2122 },
2123 ]
2124 })
2125 }
2126 p5: {
2127 #T: {
2128 a: [
2129 ...{
2130 link: 〈3;#T〉
2131 },
2132 ]
2133 a: [
2134 {},
2135 ]
2136 }
2137 a: (〈0;#T〉 & {
2138 a: [
2139 {
2140 link: {
2141 a: [
2142 {},
2143 ]
2144 }
2145 },
2146 ]
2147 })
2148 }
2149 p6: {
2150 #S: {
2151 #T: {
2152 a: [
2153 ...{
2154 link: 〈3;#T〉
2155 },
2156 ]
2157 }
2158 }
2159 #U: {
2160 〈1;#S〉
2161 #T: {
2162 a: [
2163 {},
2164 ]
2165 }
2166 }
2167 a: (〈0;#U〉.#T & {
2168 a: [
2169 {
2170 link: {
2171 a: [
2172 {},
2173 ]
2174 }
2175 },
2176 ]
2177 })
2178 }
2179 c1: {
2180 a: {
2181 b: {}
2182 c: (〈1;a〉 & 〈0;b〉)
2183 }
2184 }
2185 d1: {
2186 a: {
2187 b: {
2188 c: {
2189 d: {
2190 h: int
2191 t: 〈4;r〉
2192 }
2193 }
2194 }
2195 }
2196 r: 〈0;a〉.b
2197 x: 〈0;a〉.b.c
2198 }
2199 d2: {
2200 x: 〈0;a〉.b.c
2201 r: 〈0;a〉.b
2202 a: {
2203 b: {
2204 c: {
2205 d: {
2206 h: int
2207 t: 〈4;r〉
2208 }
2209 }
2210 }
2211 }
2212 }
2213 d3: {
2214 config: {
2215 a: {
2216 b: {
2217 c: 〈2;indirect〉
2218 }
2219 }
2220 indirect: [
2221 〈1;a〉.b,
2222 null,
2223 ][〈0;i〉]
2224 i: (int|*1)
2225 }
2226 x: (〈0;config〉 & {
2227 i: 0
2228 })
2229 }
2230 shortPathFail: _
2231 shortPathFail: {
2232 doubleRef: {
2233 a: 〈0;#List〉
2234 #List: {
2235 Next: (〈1;#List〉|*null)
2236 }
2237 }
2238 }
2239 shortPathFail: {
2240 elipsis: {
2241 t1: {
2242 #Foo: {
2243 ref: (null|〈1;#Foo〉)
2244 }
2245 #Foo: {
2246 ...
2247 }
2248 }
2249 t2: {
2250 Foo: {
2251 ref: 〈1;Foo〉
2252 }
2253 Foo: {
2254 ...
2255 }
2256 }
2257 }
2258 }
2259 patternFail: {
2260 issue2374: {
2261 [string]: {
2262 b: 〈1;(〈0;-〉)〉
2263 }
2264 a: {
2265 r: 0
2266 }
2267 }
2268 }
2269 shortPathFail: {
2270 comprehension: {
2271 #list: {
2272 tail: (〈1;#list〉|*null)
2273 if (〈0;tail〉 != null) {}
2274 }
2275 }
2276 }
2277 withLetFail: {
2278 schema: {
2279 next: 〈1;let _schema_1#1〉
2280 }
2281 let _schema_1#1 = 〈0;schema〉
2282 }
2283 listOptOK: {
2284 list: {
2285 head: int
2286 tail?: 〈1;list〉
2287 }
2288 a: (〈0;list〉 & {
2289 head: 3
2290 tail: {
2291 head: 2
2292 }
2293 })
2294 }
2295 e1: {
2296 a: 〈0;a〉
2297 a: {
2298 c: 〈1;a〉
2299 }
2300 b: {
2301 c: 〈1;b〉
2302 }
2303 b: 〈0;b〉
2304 }
2305 e2: {
2306 a: {
2307 〈1;a〉
2308 }
2309 a: {
2310 c: 〈1;a〉
2311 }
2312 b: {
2313 c: 〈1;b〉
2314 }
2315 b: {
2316 〈1;b〉
2317 }
2318 }
2319 e3: {
2320 a: [
2321 〈1;a〉,
2322 ]
2323 a: {
2324 c: 〈1;a〉
2325 }
2326 b: [
2327 〈1;b〉,
2328 ]
2329 b: {
2330 c: 〈1;b〉
2331 }
2332 }
2333 e4: {
2334 a: [
2335 (〈1;a〉|{}),
2336 ]
2337 a: [
2338 [
2339 {
2340 c: 1
2341 },
2342 ],
2343 ]
2344 b: [
2345 [
2346 {
2347 c: 1
2348 },
2349 ],
2350 ]
2351 b: [
2352 (〈1;b〉|{}),
2353 ]
2354 }
2355 e5: {
2356 a: {
2357 c: (〈1;a〉|int)
2358 }
2359 a: (〈0;a〉|int)
2360 b: (〈0;b〉|int)
2361 b: {
2362 c: (〈1;b〉|int)
2363 }
2364 }
2365 nestedList: {
2366 v1e: {
2367 x: [
2368 (〈1;x〉|int),
2369 1,
2370 ]
2371 y: (〈0;x〉 & [
2372 [
2373 [
2374 2,
2375 ],
2376 1,
2377 ],
2378 1,
2379 ])
2380 }
2381 v2e: {
2382 y: (〈0;x〉 & [
2383 [
2384 [
2385 2,
2386 ],
2387 1,
2388 ],
2389 1,
2390 ])
2391 x: [
2392 (〈1;x〉|int),
2393 1,
2394 ]
2395 }
2396 v1: {
2397 x: [
2398 (〈1;x〉|int),
2399 1,
2400 ]
2401 y: (〈0;x〉 & [
2402 [
2403 [
2404 2,
2405 1,
2406 ],
2407 1,
2408 ],
2409 1,
2410 ])
2411 }
2412 v2: {
2413 y: (〈0;x〉 & [
2414 [
2415 [
2416 2,
2417 1,
2418 ],
2419 1,
2420 ],
2421 1,
2422 ])
2423 x: [
2424 (〈1;x〉|int),
2425 1,
2426 ]
2427 }
2428 }
2429 v3: {
2430 list: {
2431 head: int
2432 tail: (〈1;list〉|null)
2433 }
2434 myList: 〈0;list〉
2435 myList: {
2436 head: 2
2437 tail: {
2438 head: 3
2439 tail: {
2440 head: 4
2441 }
2442 }
2443 }
2444 }
2445 v4: {
2446 list: {
2447 head: int
2448 tail: (〈1;list〉|1)
2449 }
2450 myList: 〈0;list〉
2451 myList: {
2452 head: 2
2453 tail: {
2454 head: 3
2455 }
2456 }
2457 }
2458 v5: {
2459 list: {
2460 head: int
2461 tail: (〈1;list〉|{})
2462 }
2463 myList: 〈0;list〉
2464 myList: {
2465 head: 2
2466 tail: {
2467 head: 3
2468 }
2469 }
2470 }
2471 z1: {
2472 y: {
2473 f: {
2474 h: 〈1;g〉
2475 }
2476 g: _
2477 }
2478 x: {
2479 f: _
2480 g: 〈0;f〉
2481 }
2482 z: (〈0;x〉 & 〈0;y〉)
2483 }
2484 crossRefNoCycle: {
2485 t1: {
2486 T: {
2487 x: _
2488 y: 〈0;x〉
2489 }
2490 C: ({
2491 x: 〈1;T〉
2492 } & 〈0;T〉)
2493 }
2494 }
2495 crossRefNoCycle: {
2496 t2: {
2497 T: {
2498 x: _
2499 y: 〈0;x〉
2500 }
2501 C: (〈0;T〉 & {
2502 x: 〈1;T〉
2503 })
2504 }
2505 }
2506 crossRefNoCycle: {
2507 t3: {
2508 T: {
2509 x: _
2510 y: 〈0;x〉
2511 z: 〈0;y〉
2512 }
2513 C: (〈0;T〉 & {
2514 x: 〈1;T〉
2515 })
2516 }
2517 }
2518 crossRefNoCycle: {
2519 t4: {
2520 T: {
2521 x: _
2522 y: 〈0;x〉
2523 z: 〈0;y〉
2524 }
2525 C: (〈0;T〉 & {
2526 x: (〈1;T〉 & {
2527 x: 〈2;T〉
2528 })
2529 })
2530 }
2531 }
2532 n1: {
2533 a: {
2534 b: int
2535 }
2536 }
2537 n2: (〈0;n1〉 & {
2538 a: 〈1;n1〉
2539 })
2540 n3: (〈0;n1〉 & {
2541 〈1;n1〉
2542 })
2543 n4: (〈0;n1〉 & {
2544 x: (〈1;n1〉 & {
2545 y: (〈2;n1〉 & {
2546 z: int
2547 })
2548 })
2549 })
2550}
View as plain text