...
1-- in.cue --
2a: {
3 {{
4 b
5 c
6 d: b
7 e: c
8 }}
9 c: {}
10}
11b: {
12
13}
14s: "foo"
15c: s
16
17// s is technically in a new struct here so it will have a one higher count than
18// the one before.
19d: [s]: 3
20
21e: {}
22e & {// Is this allowed? Probably not as per comprehension rule (ref fixes.)
23 e: {}
24}
25
26{X=["foo"]: b: X | null}
27{[Y="bar"]: b: Y}
28
29let B = {open: int}
30f: B
31
32schema: {
33 next: _schema_1
34}
35
36let _schema_1 = schema
37-- out/compile --
38--- in.cue
39{
40 a: {
41 {
42 {
43 〈3;b〉
44 〈2;c〉
45 d: 〈3;b〉
46 e: 〈2;c〉
47 }
48 }
49 c: {}
50 }
51 b: {}
52 s: "foo"
53 c: 〈0;s〉
54 d: {
55 [〈1;s〉]: 3
56 }
57 e: {}
58 (〈0;e〉 & {
59 e: {}
60 })
61 {
62 ["foo"]: {
63 b: (〈1;(〈0;-〉)〉|null)
64 }
65 }
66 {
67 ["bar"]: {
68 b: 〈1;-〉
69 }
70 }
71 let B#1 = {
72 open: int
73 }
74 f: 〈0;let B#1〉
75 schema: {
76 next: 〈1;let _schema_1#2〉
77 }
78 let _schema_1#2 = 〈0;schema〉
79}
80-- out/eval/stats --
81Leaks: 2
82Freed: 48
83Reused: 45
84Allocs: 5
85Retain: 8
86
87Unifications: 50
88Conjuncts: 102
89Disjuncts: 54
90-- out/eval --
91Errors:
92schema.next: structural cycle
93
94Result:
95(_|_){
96 // [structural cycle]
97 a: (struct){
98 d: (struct){
99 }
100 e: (struct){
101 }
102 c: (struct){
103 }
104 }
105 b: (struct){
106 }
107 s: (string){ "foo" }
108 c: (string){ "foo" }
109 d: (struct){
110 }
111 e: (struct){
112 }
113 let B#1 = (struct){
114 open: (int){ int }
115 }
116 f: (struct){
117 open: (int){ int }
118 }
119 schema: (_|_){
120 // [structural cycle]
121 next: (_|_){
122 // [structural cycle] schema.next: structural cycle
123 }
124 }
125 let _schema_1#2 = (_|_){
126 // [structural cycle] _schema_1: structural cycle:
127 // ./in.cue:32:8
128 }
129}
View as plain text