✓
Passing This code compiles and runs correctly.
Code
// Test 110_015: Entry file not nested when importing own directory
//
// When a file imports a directory it resides in, the entry file should NOT
// be included as a submodule. The entry file is already compiled as main_module.
//
// This test verifies:
// - main_module contains the entry file content (this file)
// - koru_mylib contains index.kz content
// - input.kz is NOT duplicated inside koru_mylib
const std = @import("std");
// Import the library (index.kz in the same directory as THIS FILE)
~import mylib
// Call an event from the library
~mylib:greet(name: "World") |> on-done()
// Handler that uses std - this will trigger ambiguity if nested
~event on-done {}
~proc on-done|zig {
std.debug.print("Done!\n", .{});
}
Must succeed:
Compile and run without errors.
Imported Files
// Library module (index.kz)
// Should be a SIBLING to input.kz in output, NOT its parent
const std = @import("std");
~pub event greet { name: []const u8 }
~proc greet|zig {
std.debug.print("Hello, {s}!\n", .{name});
}