---
cases:
  - note: "varreferences/array: ground var"
    query: data.generated.p = x
    modules:
      - |
        package generated

        p contains x if {
        	i = [1, 2, 3, 4]
        	j = [1, 2, 999]
        	j[k] = y
        	i[y] = x
        }
    data: {}
    want_result:
      - x:
          - 2
          - 3
    sort_bindings: true
