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

        p = x {
          __local1__ = data.a[1]
          __local2__ = data.a[2]
          __local3__ = data.a[2]
          __local0__ = {3, __local1__, __local2__} & {3, 4, __local3__}
          x = __local0__
        }
    note: sets/intersect
    query: data.generated.p = x
    want_result:
      - x:
          - 3
