---
cases:
  - note: topdowndynamicdispatch/dynamic dispatch
    query: data = x
    modules:
      - |
        package animals

        dog := "woof"

        cat := "meow"
      - |
        package dynamic

        sound := __local0__ if {
        	true
        	__local1__ = data.dynamic.animal
        	__local0__ = data.animals[__local1__]
        }

        animal := "dog" if {
        	2 > 1
        }
    data: {}
    input_term: "{}"
    want_result:
      - x:
          animals:
            cat: meow
            dog: woof
          dynamic:
            animal: dog
            sound: woof
