✓
Passing This code compiles and runs correctly.
Code
// Test: Auto-import parent module
//
// When importing "$testlib/mymod/sub", the parent "mymod.kz" should
// be automatically imported alongside it.
//
// Structure:
// testlib/
// mymod.kz → parent-hello event
// mymod/
// sub.kz → sub-hello event
import std/compiler
// Only import the submodule - parent should come automatically
import testlib/mymod/sub
// Use event from submodule (explicitly imported)
testlib/mymod/sub:sub-hello()
// Use event from parent (auto-imported)
testlib/mymod:parent-hello()
Must succeed:
Compile and run without errors.
Flows
flow ~sub-hello click a branch to expand · @labels scroll to their anchor
sub-hello
flow ~parent-hello click a branch to expand · @labels scroll to their anchor
parent-hello
Imported Files
// Submodule - this is what we explicitly import
~pub tor sub-hello {}
~proc sub-hello|zig {
}
// Parent module - should be auto-imported when importing mymod/sub
~pub tor parent-hello {}
~proc parent-hello|zig {
}