...
1-- in.cue --
2import "list"
3
4x: list.UniqueItems
5x: [string, ...string]
6x: ["x", "x"]
7-- out/eval/stats --
8Leaks: 0
9Freed: 2
10Reused: 0
11Allocs: 2
12Retain: 0
13
14Unifications: 2
15Conjuncts: 5
16Disjuncts: 3
17-- out/eval --
18Errors:
19x: invalid value ["x","x"] (does not satisfy list.UniqueItems):
20 ./in.cue:3:4
21 ./in.cue:4:4
22 ./in.cue:5:4
23
24Result:
25(_|_){
26 // [eval]
27 x: (_|_){
28 // [eval] x: invalid value ["x","x"] (does not satisfy list.UniqueItems):
29 // ./in.cue:3:4
30 // ./in.cue:4:4
31 // ./in.cue:5:4
32 0: (string){ "x" }
33 1: (string){ "x" }
34 }
35}
36-- out/compile --
37--- in.cue
38{
39 x: 〈import;list〉.UniqueItems
40 x: [
41 string,
42 ...string,
43 ]
44 x: [
45 "x",
46 "x",
47 ]
48}
View as plain text