mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
632d60e11e
Fixes #7830 When a failing test expression selected a value out of a local variable via a ground ref (e.g. tc.data), the pretty --var-values output only showed the base variable's full value rather than the selected value being compared. Resolution previously only worked for refs the compiler rewrites into locals (calls, arithmetic, variable-keyed refs); plain ground object selections stay inline and were never resolved. Handle ast.Ref terms in PrettyEvent's var walker: resolve a ground ref whose base is a bound local against the local bindings and report the selected value at the ref's location, while still descending to report the base variable too. Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>