✓
Passing This code compiles and runs correctly.
Code
// Test: Auto-import index.kz when importing any $alias/* module
//
// When we import $testlib/sub, we should automatically also get $testlib/index.kz
// This allows stdlib root utilities to be available without explicit import.
//
// Structure:
// testlib/
// index.kz -> root-hello event (namespace: testlib)
// sub.kz -> sub-hello event (namespace: testlib.sub)
//
// Expected: Both testlib:root-hello and testlib/sub:sub-hello are available
// Only import the submodule - index.kz should be auto-imported
import testlib/sub
// Use event from auto-imported index.kz (namespace: testlib)
testlib:root-hello()
// Use event from explicitly imported submodule (namespace: testlib.sub)
testlib/sub:sub-hello()
Flows
flow ~root-hello click a branch to expand · @labels scroll to their anchor
root-hello
flow ~sub-hello click a branch to expand · @labels scroll to their anchor
sub-hello
Imported Files
// Root index module - automatically imported when any $testlib/* module is imported
// This is where stdlib-wide utilities and keywords would live
~pub tor root-hello {}
~proc root-hello|zig {
}
// Submodule - when imported, index.kz should also be auto-imported
~pub tor sub-hello {}
~proc sub-hello|zig {
}