...
1-- in.cue --
2#A: {
3 b?: int
4 *{} | {c?: int} | {d?: int} | {e?: int}
5}
6
7a: #A & {
8 b: 3
9 c: 3
10}
11
12b: #A & {
13 c: 3
14 d: 4
15}
16-- out/eval/stats --
17Leaks: 0
18Freed: 46
19Reused: 39
20Allocs: 7
21Retain: 0
22
23Unifications: 34
24Conjuncts: 60
25Disjuncts: 46
26-- out/eval --
27Errors:
28b: 2 errors in empty disjunction:
29b.c: field not allowed:
30 ./in.cue:1:5
31 ./in.cue:3:2
32 ./in.cue:3:3
33 ./in.cue:11:4
34 ./in.cue:12:2
35b.d: field not allowed:
36 ./in.cue:1:5
37 ./in.cue:3:2
38 ./in.cue:3:8
39 ./in.cue:11:4
40 ./in.cue:13:2
41
42Result:
43(_|_){
44 // [eval]
45 #A: (#struct){ |(*(#struct){
46 b?: (int){ int }
47 }, (#struct){
48 b?: (int){ int }
49 c?: (int){ int }
50 }, (#struct){
51 b?: (int){ int }
52 d?: (int){ int }
53 }, (#struct){
54 b?: (int){ int }
55 e?: (int){ int }
56 }) }
57 a: (#struct){
58 b: (int){ 3 }
59 c: (int){ 3 }
60 }
61 b: (_|_){
62 // [eval] b: 2 errors in empty disjunction:
63 // b.c: field not allowed:
64 // ./in.cue:1:5
65 // ./in.cue:3:2
66 // ./in.cue:3:3
67 // ./in.cue:11:4
68 // ./in.cue:12:2
69 // b.d: field not allowed:
70 // ./in.cue:1:5
71 // ./in.cue:3:2
72 // ./in.cue:3:8
73 // ./in.cue:11:4
74 // ./in.cue:13:2
75 b?: (int){ int }
76 c: (_|_){
77 // [eval] b.c: field not allowed:
78 // ./in.cue:1:5
79 // ./in.cue:3:2
80 // ./in.cue:3:32
81 // ./in.cue:11:4
82 // ./in.cue:12:2
83 }
84 d: (_|_){
85 // [eval] b.d: field not allowed:
86 // ./in.cue:1:5
87 // ./in.cue:3:2
88 // ./in.cue:3:32
89 // ./in.cue:11:4
90 // ./in.cue:13:2
91 }
92 e?: (int){ int }
93 }
94}
95-- out/compile --
96--- in.cue
97{
98 #A: {
99 b?: int
100 (*{}|{
101 c?: int
102 }|{
103 d?: int
104 }|{
105 e?: int
106 })
107 }
108 a: (ć0;#Ać & {
109 b: 3
110 c: 3
111 })
112 b: (ć0;#Ać & {
113 c: 3
114 d: 4
115 })
116}
View as plain text