011 parent plus submodule

○ Planned This feature is planned but not yet implemented.

Auto-import parent module when importing submodule not implemented

Code

// Test 165: Parent + Submodule Import
//
// Tests that importing a submodule automatically includes the parent:
//   ~import "$std/io/file"
//   Gets: io.kz (parent) + io/file.kz (submodule)
//
// Structure:
//   koru_std/
//     io.kz           → Package-level utilities (println, etc.)
//     io/
//       file.kz       → File operations (open, read, write)
//       console.kz    → Console I/O (NOT imported)
//
// Expected: Can use both io:println() and io.file:open()
//          Cannot use io.console:write() (not imported)

const std = @import("std");

// Import file submodule (should also get parent io.kz)
~import "$std/io/file"

~event test {}
| done {}

~proc test {
    std.debug.print("Test: parent + submodule import\n", .{});
    return .{ .done = .{} };
}

// Use parent module event (from io.kz)
~std.io:println(text: "From parent io.kz")

// Use submodule event (from io/file.kz)
~std.io.file:open(path: "test.txt")
| opened |> std.io:println(text: "File opened!")
| error |> std.io:println(text: "Error opening file")

// Run test
~test()
| done |> _
input.kz

Expected Output

Test: parent + submodule import
From parent io.kz
Error opening file

Test Configuration

MUST_RUN