# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: obj unify
#evalPartial
-- in.cue --
o1: {a: 1} & {b: 2}       // {a:1,b:2}
o2: {a: 1, b:    2} & {b: 2} // {a:1,b:2}
o3: {a: 1} & {a: 1, b:    2} // {a:1,b:2}
o4: {a: 1} & {b: 2}       // {a:1,b:2}
o4: {a: 1, b:    2} & {b: 2}
o4: {a: 1} & {a: 1, b:    2}
e:  1   // 1 & {a:3}
e: {a: 3}
-- out/def --
o1: {
	a: 1
	b: 2
}
o2: {
	a: 1
	b: 2
}
o3: {
	a: 1
	b: 2
}
o4: {
	a: 1
	b: 2
}
e: _|_ // conflicting values 1 and {a: 3} (mismatched types int and struct)
-- out/legacy-debug --
<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))}
-- out/compile --
--- in.cue
{
  o1: ({
    a: 1
  } & {
    b: 2
  })
  o2: ({
    a: 1
    b: 2
  } & {
    b: 2
  })
  o3: ({
    a: 1
  } & {
    a: 1
    b: 2
  })
  o4: ({
    a: 1
  } & {
    b: 2
  })
  o4: ({
    a: 1
    b: 2
  } & {
    b: 2
  })
  o4: ({
    a: 1
  } & {
    a: 1
    b: 2
  })
  e: 1
  e: {
    a: 3
  }
}
-- out/eval/stats --
Leaks:  0
Freed:  15
Reused: 12
Allocs: 3
Retain: 0

Unifications: 15
Conjuncts:    32
Disjuncts:    15
-- out/evalalpha --
Errors:
e: conflicting values 1 and {a:3} (mismatched types int and struct):
    ./in.cue:7:5
    ./in.cue:8:4
e: cannot combine regular field "a" with 1:
    ./in.cue:8:8
    ./in.cue:7:5

Result:
(_|_){
  // [eval]
  o1: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o2: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o3: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o4: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  e: (_|_){
    // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
    //     ./in.cue:7:5
    //     ./in.cue:8:4
    // e: cannot combine regular field "a" with 1:
    //     ./in.cue:8:8
    //     ./in.cue:7:5
    a: (int){ 3 }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -2,6 +2,9 @@
 e: conflicting values 1 and {a:3} (mismatched types int and struct):
     ./in.cue:7:5
     ./in.cue:8:4
+e: cannot combine regular field "a" with 1:
+    ./in.cue:8:8
+    ./in.cue:7:5
 
 Result:
 (_|_){
@@ -26,6 +29,9 @@
     // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
     //     ./in.cue:7:5
     //     ./in.cue:8:4
+    // e: cannot combine regular field "a" with 1:
+    //     ./in.cue:8:8
+    //     ./in.cue:7:5
     a: (int){ 3 }
   }
 }
-- diff/explanation --
An extra error messages that is correct, but not required.
-- out/eval --
Errors:
e: conflicting values 1 and {a:3} (mismatched types int and struct):
    ./in.cue:7:5
    ./in.cue:8:4

Result:
(_|_){
  // [eval]
  o1: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o2: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o3: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  o4: (struct){
    a: (int){ 1 }
    b: (int){ 2 }
  }
  e: (_|_){
    // [eval] e: conflicting values 1 and {a:3} (mismatched types int and struct):
    //     ./in.cue:7:5
    //     ./in.cue:8:4
    a: (int){ 3 }
  }
}