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