---
cases:
  - note: "baseandvirtualdocs/base/virtual: undefined-2"
    query: data.topdown.v = x
    modules:
      - |
        package topdown.a.b.c.undefined1

        p if {
        	false
        }

        p if {
        	false
        }

        q if {
        	false
        }
      - |
        package topdown.set

        v contains __local6__ if {
        	true
        	__local6__ = data.topdown.set.u[_]
        }
      - |
        package topdown.a.b.c

        p := [1, 2]

        q := [3, 4]

        r["a"] := 1

        r["b"] := 2
      - |
        package topdown_test_partial

        __result__ := _result if {
        	_result = {}
        }
      - |
        package enum_errors.a.b.c

        p := x if {
        	__local0__ = 1 / 0
        	x = __local0__
        }
      - |
        package topdown.g.h

        p if {
        	false
        }
      - |
        package topdown.a.b.c.undefined2

        p if {
        	input.foo
        }
      - |
        package topdown.no.base.doc

        p := true
      - |
        package topdown.a.b.c.s

        w := {"f": 10, "g": 9.9}
      - |
        package enum_errors.caller

        p[x] := y if {
        	data.enum_errors.a[x] = y
        }
      - |
        package topdown.virtual.constants

        p := 1

        q := 2

        r := 1
      - |
        package topdown.a.b.c.empty
      - |
        package topdown.missing.input.value

        p := __local7__ if {
        	true
        	__local7__ = input.deadbeef
        }
      - |
        package topdown.conflicts

        k := "bar"
      - |
        package topdown

        p contains [x1, x2, x3, x4] if {
        	data.topdown.a.b[x1][x2][x3] = x4
        }

        q contains [x1, x2, x3] if {
        	data.topdown.a.b[x1][x2][0] = x3
        }

        r contains [x1, x2] if {
        	data.topdown.a.b[x1] = x2
        }

        s := __local1__ if {
        	true
        	__local1__ = data.topdown.no
        }

        t := __local2__ if {
        	true
        	__local2__ = data.topdown.a.b.c.undefined1
        }

        u := __local3__ if {
        	true
        	__local3__ = data.topdown.missing.input.value
        }

        v := __local4__ if {
        	true
        	__local4__ = data.topdown.g
        }

        w := __local5__ if {
        	true
        	__local5__ = data.topdown.set
        }

        iterate_ground contains x if {
        	data.topdown.virtual.constants[x] = 1
        }
      - |
        package partial.topdown

        r contains ["c", x21] if {
        	data.topdown.a.b.c = x21
        }

        r contains ["c", x21] if {
        	data.topdown.a.b.c = x21
        }
    data:
      topdown:
        g:
          h:
            k:
              - "1"
              - "2"
              - "3"
    input_term: "{}"
    want_result:
      - x:
          h:
            k:
              - "1"
              - "2"
              - "3"
