-- in.cue --
#App: {
	name?: string
	sub1?: sub2?: null | _
}
#Output: null | #App
out: #Output & {
	name: "foo"
	sub1: sub2: {} | _
	sub1: sub2: {
		sub3: {
			let _let = "bar"
			foo: _let
		}
	}
}
-- out/eval/stats --
Leaks:  0
Freed:  48
Reused: 39
Allocs: 9
Retain: 0

Unifications: 34
Conjuncts:    65
Disjuncts:    48
-- out/evalalpha --
(struct){
  #App: (#struct){
    name?: (string){ string }
    sub1?: (#struct){
      sub2?: (_){ |((null){ null }, (_){ _ }) }
    }
  }
  #Output: ((null|struct)){ |((null){ null }, (#struct){
      name?: (string){ string }
      sub1?: (#struct){
        sub2?: (_){ |((null){ null }, (_){ _ }) }
      }
    }) }
  out: (#struct){
    name: (string){ "foo" }
    sub1: (#struct){
      sub2: (#struct){
        sub3: (struct){
          let _let#1 = (string){ "bar" }
          foo: (string){ "bar" }
        }
      }
    }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -14,7 +14,7 @@
   out: (#struct){
     name: (string){ "foo" }
     sub1: (#struct){
-      sub2: (struct){
+      sub2: (#struct){
         sub3: (struct){
           let _let#1 = (string){ "bar" }
           foo: (string){ "bar" }
-- out/eval --
(struct){
  #App: (#struct){
    name?: (string){ string }
    sub1?: (#struct){
      sub2?: (_){ |((null){ null }, (_){ _ }) }
    }
  }
  #Output: ((null|struct)){ |((null){ null }, (#struct){
      name?: (string){ string }
      sub1?: (#struct){
        sub2?: (_){ |((null){ null }, (_){ _ }) }
      }
    }) }
  out: (#struct){
    name: (string){ "foo" }
    sub1: (#struct){
      sub2: (struct){
        sub3: (struct){
          let _let#1 = (string){ "bar" }
          foo: (string){ "bar" }
        }
      }
    }
  }
}
-- out/compile --
--- in.cue
{
  #App: {
    name?: string
    sub1?: {
      sub2?: (null|_)
    }
  }
  #Output: (null|〈0;#App〉)
  out: (〈0;#Output〉 & {
    name: "foo"
    sub1: {
      sub2: ({}|_)
    }
    sub1: {
      sub2: {
        sub3: {
          let _let#1 = "bar"
          foo: 〈0;let _let#1〉
        }
      }
    }
  })
}
