---
cases:
  - data:
      a:
        - 1
        - 2
        - 3
        - 4
    modules:
      - |
        package generated

        p[x] {
          __local0__ = data.generated.q[_]
          x = data.a[__local0__]
        }

        q[k] = v {
          o = {"a": 2, "b": 3, "c": 100}
          o[k] = v
        }
    note: "nestedreferences/vdoc ref: partial object"
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - 3
          - 4
