# Tests that list.UniqueItems correctly rejects lists with duplicate
# values, which were silently passed through instead of producing an error.
# https://cuelang.org/issue/299
-- in.cue --
import "list"

x: list.UniqueItems
x: [string, ...string]
x: ["x", "x"]
-- out/compile --
--- in.cue
{
  x: 〈import;list〉.UniqueItems
  x: [
    string,
    ...string,
  ]
  x: [
    "x",
    "x",
  ]
}
