// Ensure that references are resolved on the boundaries of disjunctions.
-- in.cue --
resolveAcrossDisjunct: t1: {
	{} | { #B: 1} // d resolves to 1 in the second case.
	{d: #B} | {}
	#B: int
	@test(eq, {#B: int, d: int} | {#B: int} | {#B: 1, d: 1} | {#B: 1})
}
resolveAcrossDisjunct: nested: {
	{} | { a: b: #B: 1} // d resolves to 1 in the second case.
	{d: a.b.#B} | {}
	a: b: #B: int
	@test(eq, {a: {b: {#B: int}}, d: int} | {a: {b: {#B: int}}} | {a: {b: {#B: 1}}, d: 1} | {a: {b: {#B: 1}}})
}
-- out/eval/stats --
Leaks:  0
Freed:  48
Reused: 15
Allocs: 33
Retain: 0

Unifications: 12
Conjuncts:    33
Disjuncts:    12

NumCloseIDs: 6
