-- in.cue --
t1: a: {
	foo?: int

	b: foo
}
t2: a: {
	b: foo

	foo?: int
}
-- out/eval/stats --
Leaks:  0
Freed:  9
Reused: 4
Allocs: 5
Retain: 1

Unifications: 9
Conjuncts:    9
Disjuncts:    10
-- out/eval --
(struct){
  t1: (struct){
    a: (struct){
      foo?: (int){ int }
      b: (_|_){
        // [incomplete] t1.a.b: cannot reference optional field: foo:
        //     ./in.cue:4:5
      }
    }
  }
  t2: (struct){
    a: (struct){
      b: (_|_){
        // [incomplete] t2.a.b: cannot reference optional field: foo:
        //     ./in.cue:7:5
      }
      foo?: (int){ int }
    }
  }
}
-- out/compile --
--- in.cue
{
  t1: {
    a: {
      foo?: int
      b: 〈0;foo〉
    }
  }
  t2: {
    a: {
      b: 〈0;foo〉
      foo?: int
    }
  }
}
