✓
Passing This code compiles and runs correctly.
Code
// Test 169: Local Name Resolution Priority
// CRITICAL: Unqualified names MUST resolve to local events FIRST
// Even when imported modules have events with the same name
//
// Bug being tested: Emitter was resolving unqualified ~print() to
// koru_std.io.print_event instead of main_module.print_event
~import std/io
// Local print event - same name as std/io:print
// This MUST take priority for unqualified invocations
~event print {}
~proc print|zig {
const std = @import("std");
std.debug.print("Local print called\n", .{});
}
// Unqualified invocation - MUST resolve to local main_module.print_event
// NOT to koru_std.io.print_event
~print()
// Explicit qualification still works for imported version
~std/io:print.ln("Imported println works too")
Actual
Local print called
Imported println works too
Expected output
Local print called
Imported println works too
Test Configuration
MUST_RUN