# Tests that a list constrained with [...#X] where #X is a disjunction of
# definitions correctly accepts values matching either branch of the disjunction.
# https://cuelang.org/issue/419
-- in.cue --
#A: {
	a: string
}

#B: {
	b: string
}

#X: #A | #B

l: [...#X]

l: [
	{b: "bar"},
]
-- out/compile --
--- in.cue
{
  #A: {
    a: string
  }
  #B: {
    b: string
  }
  #X: (〈0;#A〉|〈0;#B〉)
  l: [
    ...〈1;#X〉,
  ]
  l: [
    {
      b: "bar"
    },
  ]
}
