---
cases:
  - note: partialobjectdoc/ref
    query: data.generated.q = x
    modules:
      - |
        package generated

        p.q[k] := v if {
        	k := ["foo", "bar"][v]
        }

        p.baz := 2

        q if {
        	x := "bar"
        	y := "q"
        	p[y][x] == 1
        }
    want_result:
      - x: true
