This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
No error when multiplying inequality constraints #684
Labels
duplicate
This issue or pull request already exists
Milestone
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
yes
What did you do?
I was exploring a more concise/expressive way of minimum and maximum list length:
https://cuelang.org/play/?id=CXTDnET25_-#cue@export@cue
What did you expect to see?
If this were a feature/operation in cue, I would expect so see x fail to validate because it does not have between 1 and 5 elements, and because those elements aren't all the value -1.
If this is not a feature of cue (and it appears not to be), I would expect to see a language-level error indicating that inequality constraints are not compatible with the multiplication operator.
What did you see instead?
cue eval
results in:The first two lines appear not to contribute any constraint, though commenting out the last line of the input yields:
(so cue is parsing, rather than discarding, these constraints).
Note that multiplying inequality constraints together (such as
<5 * >10
) is also accepted by cue, but appears to have no validation effect either.The text was updated successfully, but these errors were encountered: