-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Labels
NeedsFixdefaultsdisjunctionsorderingBugs where the evaluator behaves differently depending on the order of fields, files, etc.Bugs where the evaluator behaves differently depending on the order of fields, files, etc.
Description
What version of CUE are you using (cue version)?
0.4.0
What did you do?
exec cue eval defaults.cue
-- defaults.cue --
a: [{
x: *(1|2) | (1|*2)
y: *(1|2) | (*1|2)
}, {
x: (1|*2) | *(1|2)
y: (*1|2) | *(1|2)
}, {
x: (1|2) | (1|*2)
y: (1|2) | (*1|2)
}]
b: [{
x: *1 | (1|*2)
y: *1 | (*1|2)
}, {
x: (1|*2) | *1
y: (*1|2) | *1
}, {
x: 1 | (1|*2)
y: 1 | (*1|2)
}]
c: [{
x: (*1|2) | (*1|2)
y: *(*1|2) | (*1|2)
z: (*1|2) | *(*1|2)
}]
What did you see?
a: [{
x: 1
y: 2
}, {
x: 1 | 2
y: 1 | 2
}, {
x: 2
y: 1
}]
b: [{
x: 1
y: 1 | 2
}, {
x: 1
y: 1
}, {
x: 2
y: 1
}]
c: [{
x: 1
y: 1 | 2
z: 1
}]
What did you expect to see?
Not exactly sure on the rules for how these defaults should be eliminated and what the results should be.
There are certain inconsistencies
a.0I would expect x and y to be the other, i.e. matcha.2a.0vsa.1I would expect the same answer for both, as the L/R top-level have switch sides- same for
b.0vsb.1 c.0I would expect all to be the same,1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NeedsFixdefaultsdisjunctionsorderingBugs where the evaluator behaves differently depending on the order of fields, files, etc.Bugs where the evaluator behaves differently depending on the order of fields, files, etc.