Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/cmd/cue-ast-print: do not panic on invalid values
For example, in SliceExpr, the High field can be a nil interface, and that caused us to panic as reflect.Value.Elem returns a zero Value in such a scenario. Thanks to Rudolf Farkas for the report and fix. Note that we don't have any tests right now, as this tool is used only for debugging purposes. Closes #2771 as merged. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Id41797ea500b75bbc7a09f7f40cc9e51f5c0931a Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194721 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information