...
1-- stats.txt --
2Leaks: 0
3Freed: 16
4Reused: 10
5Allocs: 6
6Retain: 0
7
8Unifications: 10
9Conjuncts: 94
10Disjuncts: 16
11
12-- in.cue --
13package lpcorpus
14
15#Value: {type: "int"} | {type: "float"} | {type: "string"}
16
17foo: [{type: "float"}] & [...#Value]
18foo: [{type: "float"}] & [...#Value]
19foo: [{type: "float"}] & [...#Value]
20foo: [{type: "float"}] & [...#Value]
21foo: [{type: "float"}] & [...#Value]
22foo: [{type: "string"}] & [...#Value]
23foo: [{type: "string"}] & [...#Value]
24foo: [{type: "string"}] & [...#Value]
25foo: [{type: "float"}] & [...#Value]
26foo: [{type: "float"}] & [...#Value]
27-- out/eval/stats --
28Leaks: 0
29Freed: 16
30Reused: 10
31Allocs: 6
32Retain: 0
33
34Unifications: 10
35Conjuncts: 94
36Disjuncts: 16
37-- out/eval --
38Errors:
39foo.0: 2 errors in empty disjunction:
40foo.0.type: conflicting values "int" and "float":
41 ./in.cue:3:16
42 ./in.cue:5:14
43 ./in.cue:5:27
44 ./in.cue:5:30
45foo.0.type: conflicting values "string" and "float":
46 ./in.cue:5:14
47 ./in.cue:10:14
48
49Result:
50(_|_){
51 // [eval]
52 #Value: (#struct){ |((#struct){
53 type: (string){ "int" }
54 }, (#struct){
55 type: (string){ "float" }
56 }, (#struct){
57 type: (string){ "string" }
58 }) }
59 foo: (_|_){
60 // [eval]
61 0: (_|_){
62 // [eval] foo.0: 2 errors in empty disjunction:
63 // foo.0.type: conflicting values "int" and "float":
64 // ./in.cue:3:16
65 // ./in.cue:5:14
66 // ./in.cue:5:27
67 // ./in.cue:5:30
68 // foo.0.type: conflicting values "string" and "float":
69 // ./in.cue:5:14
70 // ./in.cue:10:14
71 type: (_|_){
72 // [eval] foo.0.type: conflicting values "string" and "float":
73 // ./in.cue:5:14
74 // ./in.cue:10:14
75 }
76 }
77 }
78}
79-- out/compile --
80--- in.cue
81{
82 #Value: ({
83 type: "int"
84 }|{
85 type: "float"
86 }|{
87 type: "string"
88 })
89 foo: ([
90 {
91 type: "float"
92 },
93 ] & [
94 ...〈1;#Value〉,
95 ])
96 foo: ([
97 {
98 type: "float"
99 },
100 ] & [
101 ...〈1;#Value〉,
102 ])
103 foo: ([
104 {
105 type: "float"
106 },
107 ] & [
108 ...〈1;#Value〉,
109 ])
110 foo: ([
111 {
112 type: "float"
113 },
114 ] & [
115 ...〈1;#Value〉,
116 ])
117 foo: ([
118 {
119 type: "float"
120 },
121 ] & [
122 ...〈1;#Value〉,
123 ])
124 foo: ([
125 {
126 type: "string"
127 },
128 ] & [
129 ...〈1;#Value〉,
130 ])
131 foo: ([
132 {
133 type: "string"
134 },
135 ] & [
136 ...〈1;#Value〉,
137 ])
138 foo: ([
139 {
140 type: "string"
141 },
142 ] & [
143 ...〈1;#Value〉,
144 ])
145 foo: ([
146 {
147 type: "float"
148 },
149 ] & [
150 ...〈1;#Value〉,
151 ])
152 foo: ([
153 {
154 type: "float"
155 },
156 ] & [
157 ...〈1;#Value〉,
158 ])
159}
View as plain text