Skip to content

Commit c925040

Browse files
committed
internal/core/adt: handle incomplete values in comparators
Previously, incomplete values were not correctly identified for recursive values like list elements. We fix this by validating incoming errors recursively using Validate. As this eliminates incomplete values from the input, this also allows us to use Equal to compare lists. Some of the errors that should be incomplete, now are, which is good. Some of the errors that should be final are still incomplete, this is okay. In general it is okay to be a weaker error when a stronger error is allowed. Note that this changes the semantics of newBool, which is fine, as it only is used by binOp. Issue #2583 Signed-off-by: Marcel van Lohuizen <[email protected]> Change-Id: I596b927fbbb801a3dd0d8f331a211c2b081afca8 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1217008 Reviewed-by: Roger Peppe <[email protected]> Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 16c782a commit c925040

File tree

6 files changed

+820
-122
lines changed

6 files changed

+820
-122
lines changed

0 commit comments

Comments
 (0)