---
cases:
  - data:
      obj_ref_missing_key:
        x: 3
        z: 2
    modules:
      - |
        package generated

        p[x] {
          __local0__ = data.obj_ref_missing_key
          obj = {"a": {"x": 1, "y": 2}, "b": __local0__, "c": {"x": 2, "y": 2}}
          obj[_] = {"x": x, "y": 2}
        }
    note: undos/object-ref-missing-key
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - 1
          - 2
