✓
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()
Imported Files
// Root index module - automatically imported when any $testlib/* module is imported
// This is where stdlib-wide utilities and keywords would live
~pub event root_hello {}
~proc root_hello {
}
// Submodule - when imported, index.kz should also be auto-imported
~pub event sub_hello {}
~proc sub_hello {
}