// Optional fields should retain status after removal of unified
// content.

// Issue #855

-- cue.mod/module.cue --
module: "mod.test"
language: version: "v0.9.0"
-- a.cue --
package pkg

a: [...#A]

a: [{
	annotations: {}
}]

#A: annotations?: [string]: string

b: #B
b: bb: c:   2 // c can be removed, bb not.
#B: bb?: c: 2
-- out/trim-v3 --
== a.cue
package pkg

a: [...#A]

a: [{
	annotations: {}
}]

#A: annotations?: [string]: string

b: #B
b: bb: _ // c can be removed, bb not.
#B: bb?: c: 2
-- diff/-out/trim-v3<==>+out/trim --
diff old new
--- old
+++ new
@@ -9,6 +9,6 @@
 
 #A: annotations?: [string]: string
 
-b:        #B
-b: bb: {} // c can be removed, bb not.
+b: #B
+b: bb: _ // c can be removed, bb not.
 #B: bb?: c: 2
-- out/trim-v3-noshare --
== a.cue
package pkg

a: [...#A]

a: [{
	annotations: {}
}]

#A: annotations?: [string]: string

b: #B
b: bb: _ // c can be removed, bb not.
#B: bb?: c: 2
-- diff/-out/trim-v3-noshare<==>+out/trim --
diff old new
--- old
+++ new
@@ -9,6 +9,6 @@
 
 #A: annotations?: [string]: string
 
-b:        #B
-b: bb: {} // c can be removed, bb not.
+b: #B
+b: bb: _ // c can be removed, bb not.
 #B: bb?: c: 2
-- out/trim --
== a.cue
package pkg

a: [...#A]

a: [{
	annotations: {}
}]

#A: annotations?: [string]: string

b:        #B
b: bb: {} // c can be removed, bb not.
#B: bb?: c: 2
