...
1# DO NOT EDIT; generated by go run testdata/gen.go
2#
3#name: obj unify
4#evalPartial
5-- in.cue --
6o1: {a: 1} & {b: 2} // {a:1,b:2}
7o2: {a: 1, b: 2} & {b: 2} // {a:1,b:2}
8o3: {a: 1} & {a: 1, b: 2} // {a:1,b:2}
9o4: {a: 1} & {b: 2} // {a:1,b:2}
10o4: {a: 1, b: 2} & {b: 2}
11o4: {a: 1} & {a: 1, b: 2}
12e: 1 // 1 & {a:3}
13e: {a: 3}
14-- out/def --
15o1: {
16 a: 1
17 b: 2
18}
19o2: {
20 a: 1
21 b: 2
22}
23o3: {
24 a: 1
25 b: 2
26}
27o4: {
28 a: 1
29 b: 2
30}
31e: _|_ // conflicting values 1 and {a: 3} (mismatched types int and struct)
32-- out/legacy-debug --
33<0>{o1: <1>{a: 1, b: 2}, o2: <2>{a: 1, b: 2}, o3: <3>{a: 1, b: 2}, o4: <4>{a: 1, b: 2}, e: _|_((1 & <5>{a: 3}):conflicting values 1 and {a: 3} (mismatched types int and struct))}
34-- out/compile --
35--- in.cue
36{
37 o1: ({
38 a: 1
39 } & {
40 b: 2
41 })
42 o2: ({
43 a: 1
44 b: 2
45 } & {
46 b: 2
47 })
48 o3: ({
49 a: 1
50 } & {
51 a: 1
52 b: 2
53 })
54 o4: ({
55 a: 1
56 } & {
57 b: 2
58 })
59 o4: ({
60 a: 1
61 b: 2
62 } & {
63 b: 2
64 })
65 o4: ({
66 a: 1
67 } & {
68 a: 1
69 b: 2
70 })
71 e: 1
72 e: {
73 a: 3
74 }
75}
76-- out/eval/stats --
77Leaks: 0
78Freed: 15
79Reused: 12
80Allocs: 3
81Retain: 0
82
83Unifications: 15
84Conjuncts: 32
85Disjuncts: 15
86-- out/evalalpha --
87Errors:
88e: conflicting values 1 and {a:3} (mismatched types int and struct):
89 ./in.cue:7:5
90 ./in.cue:8:4
91e: cannot combine regular field "a" with 1:
92 ./in.cue:8:8
93 ./in.cue:7:5
94
95Result:
96(_|_){
97 // [eval]
98 o1: (struct){
99 a: (int){ 1 }
100 b: (int){ 2 }
101 }
102 o2: (struct){
103 a: (int){ 1 }
104 b: (int){ 2 }
105 }
106 o3: (struct){
107 a: (int){ 1 }
108 b: (int){ 2 }
109 }
110 o4: (struct){
111 a: (int){ 1 }
112 b: (int){ 2 }
113 }
114 e: (_|_){
115 // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
116 // ./in.cue:7:5
117 // ./in.cue:8:4
118 // e: cannot combine regular field "a" with 1:
119 // ./in.cue:8:8
120 // ./in.cue:7:5
121 a: (int){ 3 }
122 }
123}
124-- diff/-out/evalalpha<==>+out/eval --
125diff old new
126--- old
127+++ new
128@@ -2,6 +2,9 @@
129 e: conflicting values 1 and {a:3} (mismatched types int and struct):
130 ./in.cue:7:5
131 ./in.cue:8:4
132+e: cannot combine regular field "a" with 1:
133+ ./in.cue:8:8
134+ ./in.cue:7:5
135
136 Result:
137 (_|_){
138@@ -26,6 +29,9 @@
139 // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
140 // ./in.cue:7:5
141 // ./in.cue:8:4
142+ // e: cannot combine regular field "a" with 1:
143+ // ./in.cue:8:8
144+ // ./in.cue:7:5
145 a: (int){ 3 }
146 }
147 }
148-- diff/explanation --
149An extra error messages that is correct, but not required.
150-- out/eval --
151Errors:
152e: conflicting values 1 and {a:3} (mismatched types int and struct):
153 ./in.cue:7:5
154 ./in.cue:8:4
155
156Result:
157(_|_){
158 // [eval]
159 o1: (struct){
160 a: (int){ 1 }
161 b: (int){ 2 }
162 }
163 o2: (struct){
164 a: (int){ 1 }
165 b: (int){ 2 }
166 }
167 o3: (struct){
168 a: (int){ 1 }
169 b: (int){ 2 }
170 }
171 o4: (struct){
172 a: (int){ 1 }
173 b: (int){ 2 }
174 }
175 e: (_|_){
176 // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
177 // ./in.cue:7:5
178 // ./in.cue:8:4
179 a: (int){ 3 }
180 }
181}
View as plain text