# Tests that transitive package imports are correctly propagated. When foo imports
# bar which imports baz, evaluating foo should include values from all three
# packages rather than omitting the transitively imported baz contents.
# https://cuelang.org/issue/398
-- cue.mod/module.cue --
module: "mod.test"
language: version: "v0.9.0"
-- foo.cue --
package foo

import "mod.test/pkg:bar"

bar
zz: 3
-- pkg/bar.cue --
package bar

import "mod.test/pkg:baz"

baz
yy: 2
-- pkg/baz.cue --
package baz

xx: 1
-- out/compile --
--- foo.cue
{
  〈import;"mod.test/pkg:bar"〉
  zz: 3
}
