---
cases:
  - note: functions/false else value
    query: data.ex.falsy_else_value = x
    modules:
      - |
        package topdown_test_partial

        __result__ := _result if {
        	_result = true
        }
      - |
        package ex

        foo(__local40__) := y if {
        	split(__local40__, "i", y)
        }

        bar[x] := y if {
        	data.l[_].a = x
        	data.ex.foo(x, y)
        }

        chain0(__local41__) := y if {
        	data.ex.foo(__local41__, y)
        }

        chain1(__local42__) := b if {
        	data.ex.chain0(__local42__, b)
        }

        chain2 := d if {
        	data.ex.chain1("fooibar", d)
        }

        cross(__local43__) := [a, b] if {
        	split(__local43__, "i", y)
        	__local27__ = y[1]
        	data.ex.foo(__local27__, b)
        	__local28__ = y[2]
        	data.test.foo(__local28__, a)
        }

        falsy_func(__local44__) := false

        falsy_func_else(__local45__) if {
        	__local45__ = 1
        }

        else := false

        falsy_undefined if {
        	data.ex.falsy_func(1)
        }

        falsy_negation if {
        	not data.ex.falsy_func(1)
        }

        falsy_else_value := __local23__ if {
        	true
        	data.ex.falsy_func_else(2, __local23__)
        }

        falsy_else_undefined if {
        	data.ex.falsy_func_else(2)
        }

        falsy_else_negation if {
        	not data.ex.falsy_func_else(2)
        }

        arrays([__local64__, __local65__]) := [a, b] if {
        	data.ex.foo(__local64__, a)
        	data.ex.foo(__local65__, b)
        }

        arraysrule := y if {
        	data.ex.arrays(["hih", "foo"], y)
        }

        objects({"foo": __local69__, "bar": __local71__}) := z if {
        	data.ex.foo(__local69__, a)
        	data.test.foo(__local71__, b)
        	z = [a, b]
        }

        objectsrule := y if {
        	data.ex.objects({"bar": "hi ho", "foo": "hih"}, y)
        }

        refoutput := y if {
        	data.ex.foo("hih", z)
        	y = z[1]
        }

        void(__local73__) if {
        	__local73__ = "foo"
        }

        voidGood if {
        	not data.ex.void("bar", true)
        }

        voidBad if {
        	data.ex.void("bar", true)
        }

        multi(1, __local75__) := y if {
        	y = __local75__
        }

        multi(2, __local76__) := y if {
        	__local24__ = 2 * __local76__
        	a = __local24__
        	__local25__ = a + 1
        	y = __local25__
        }

        multi(3, __local77__) := y if {
        	__local26__ = __local77__ * 10
        	y = __local26__
        }

        multi("foo", __local78__) := y if {
        	y = "bar"
        }

        multi1 := y if {
        	data.ex.multi(1, 2, y)
        }

        multi2 := y if {
        	data.ex.multi(2, 2, y)
        }

        multi3 := y if {
        	data.ex.multi(3, 2, y)
        }

        multi4 := y if {
        	data.ex.multi("foo", 2, y)
        }

        always_true_fn(__local79__) := true

        always_true if {
        	data.ex.always_true_fn(1)
        }
      - |
        package test

        foo(__local86__) := y if {
        	trim(__local86__, "h o", y)
        }

        cross := y if {
        	data.ex.cross("hi, my name is foo", y)
        }

        multi("foo", __local87__) := y if {
        	y = __local87__
        }

        multi("bar", __local88__) := y if {
        	y = "baz"
        }

        multi_cross_pkg := [y, z] if {
        	data.test.multi("foo", "bar", y)
        	data.ex.multi(2, 1, z)
        }
      - |
        package test

        samepkg := y if {
        	data.test.foo("how do you do?", y)
        }
      - |
        package test.l1.l3

        g(__local91__) := __local91__
      - |
        package test.l1.l2

        p := true

        f(__local94__) := __local94__
      - |
        package test.omit_result

        f(__local97__) := __local97__

        p if {
        	data.test.omit_result.f(1)
        }
    data: {}
    want_result:
      - x: false
