Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/jsonschema: fix panic on impossible enum
When all possible values of an enum are excluded by the allowed types we were invoking s.all.add with a nil expression which resulted in a panic. Fix that by avoiding adding the constraint in that case: the allowedTypes logic will catch the "impossible constraint" option when finalize is called. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I0836d0444a24df62f6392261a5d5733387529ff6 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199410 Reviewed-by: Daniel Martí <[email protected]> Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information