# Tests that a disjunction of identical definitions (#Both: #App | #Atom where
# both alias the same type) correctly unifies with an additional constraint.
# https://cuelang.org/issue/493
-- in.cue --
#Artifact: {
	body: _
	other: [string]: int
}

#App:  #Artifact
#Atom: #Artifact

#Both: #App | #Atom

t1: #Both & {body: 3}
-- out/compile --
--- in.cue
{
  #Artifact: {
    body: _
    other: {
      [string]: int
    }
  }
  #App: 〈0;#Artifact〉
  #Atom: 〈0;#Artifact〉
  #Both: (〈0;#App〉|〈0;#Atom〉)
  t1: (〈0;#Both〉 & {
    body: 3
  })
}
