| 1 |
-- in.cue -- |
| 2 |
foo: [string]: { |
| 3 |
t: [string]: { |
| 4 |
x: >=0 & <=5 |
| 5 |
} |
| 6 |
} |
| 7 |
|
| 8 |
foo: multipath: { |
| 9 |
t: [string]: { |
| 10 |
// Combined with the other constraints, we know the value must be 5 and |
| 11 |
// thus the entry below can be eliminated. As the evaluator does not |
| 12 |
// reduce this, we should not eliminate it, though. |
| 13 |
x: >=5 & <=8 & int |
| 14 |
} |
| 15 |
|
| 16 |
t: u: { x: 5 } |
| 17 |
} |
| 18 |
|
| 19 |
group: { |
| 20 |
for k, v in foo { |
| 21 |
comp: "\(k)": v |
| 22 |
} |
| 23 |
} |
| 24 |
-- out/trim -- |
| 25 |
== in.cue |
| 26 |
foo: [string]: { |
| 27 |
t: [string]: { |
| 28 |
x: >=0 & <=5 |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
foo: multipath: { |
| 33 |
t: [string]: { |
| 34 |
// Combined with the other constraints, we know the value must be 5 and |
| 35 |
// thus the entry below can be eliminated. As the evaluator does not |
| 36 |
// reduce this, we should not eliminate it, though. |
| 37 |
x: >=5 & <=8 & int |
| 38 |
} |
| 39 |
|
| 40 |
t: u: {x: 5} |
| 41 |
} |
| 42 |
|
| 43 |
group: { |
| 44 |
for k, v in foo { |
| 45 |
comp: "\(k)": v |
| 46 |
} |
| 47 |
} |