// 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
}
resolveAcrossDisjunct: nested: {
	{} | {a: b: #B: 1} // d resolves to 1 in the second case.
	{d: a.b.#B} | {}
	a: b: #B: int
}
-- out/compile --
--- in.cue
{
  resolveAcrossDisjunct: {
    t1: {
      ({}|{
        #B: 1
      })
      ({
        d: 〈1;#B〉
      }|{})
      #B: int
    }
  }
  resolveAcrossDisjunct: {
    nested: {
      ({}|{
        a: {
          b: {
            #B: 1
          }
        }
      })
      ({
        d: 〈1;a〉.b.#B
      }|{})
      a: {
        b: {
          #B: int
        }
      }
    }
  }
}
