011 invalid module qualifier

✓ Passing This code compiles and runs correctly.

Code

// Test 618b: Invalid Module Qualifier (MUST FAIL)
// Validates that short-form module qualifiers like "io:println" are rejected
// Koru does NOT support import aliases - must always use full path

~import "$std/io"

~event test {}
| done {}

~proc test {
    return .{ .done = .{} };
}

// This should FAIL - "io" is not a valid module qualifier
// Correct form is: std.io:println
~test()
| done |> io:println(text: "WRONG - should be std.io:println")
input.kz

Error Verification

Expected Error Pattern

VALIDATION TEST: Invalid Module Qualifier

This test MUST FAIL to verify that Koru correctly rejects invalid module qualifiers.

Expected error:
  error[PARSE001]: Event 'io:println' not found in registry

Koru does NOT support import aliases. You must ALWAYS use the full module path:
- ✅ Correct: ~import "$std/io" then use std.io:println
- ❌ Wrong:   ~import "$std/io" then use io:println

This test uses the incorrect short form "io:println" and should fail during parsing.
If this test PASSES, our module qualifier validation is BROKEN.

Actual Compiler Output

[PHASE 2.4] Calling run_pass for transforms\n[PHASE 2.5] Executing comptime_main() - running comptime flows
[PHASE 2.5] Comptime flows complete (23 items)
[PHASE 2.6] Rescanning transformed AST (23 items)
[PHASE 2.6] Rescan complete: 27 comptime events found
  [0] std.compiler:requires
  [1] std.compiler:flag.declare
  [2] std.compiler:command.declare
  [3] std.compiler:coordinate
  [4] std.compiler:context_create
  [5] std.io:print.ln
  [6] std.io:print.blk
  [7] std.testing:test
  [8] std.testing:validate_mocks
  [9] std.testing:test.with_harness
  [10] std.testing:test.harness
  [11] std.testing:assert
  [12] std.testing:test.property.equivalent
  [13] std.deps:deps
  [14] std.deps:requires.system
  [15] std.deps:requires.zig
  [16] std.control:if
  [17] std.control:for
  [18] std.control:capture
  [19] std.control:const
  [20] std.build:requires
  [21] std.build:variants
  [22] std.build:config
  [23] std.build:command.sh
  [24] std.build:command.zig
  [25] std.build:step
  [26] std.template:define

[PHANTOM-KORU] Starting phantom check proc...
[DEAD-STRIP] Removing event_decl: std.compiler:coordinate
[DEAD-STRIP] Removing event_decl: std.compiler:ast_dump
[DEAD-STRIP] Removing proc_decl: std.compiler:ast_dump
[DEAD-STRIP] Removing event_decl: std.compiler:transform_taps
[DEAD-STRIP] Removing proc_decl: std.compiler:transform_taps
[DEAD-STRIP] Removing event_decl: std.compiler:parse
[DEAD-STRIP] Removing proc_decl: std.compiler:parse
[DEAD-STRIP] Removing event_decl: std.io:print
[DEAD-STRIP] Removing proc_decl: std.io:print
[DEAD-STRIP] Removing event_decl: std.io:println
[DEAD-STRIP] Removing proc_decl: std.io:println
[DEAD-STRIP] Removing event_decl: std.io:readln
[DEAD-STRIP] Removing proc_decl: std.io:readln
[DEAD-STRIP] Removing event_decl: std.io:read.ln
[DEAD-STRIP] Removing proc_decl: std.io:read.ln
[DEAD-STRIP] Removing event_decl: std.io:eprintln
[DEAD-STRIP] Removing proc_decl: std.io:eprintln
[DEAD-STRIP] Removing event_decl: std.io:success
[DEAD-STRIP] Removing proc_decl: std.io:success
[DEAD-STRIP] Removing event_decl: std.io:warn
[DEAD-STRIP] Removing proc_decl: std.io:warn
[DEAD-STRIP] Removing event_decl: std.io:read_stdin
[DEAD-STRIP] Removing proc_decl: std.io:read_stdin
[DEAD-STRIP] Removing event_decl: std.io:read_file
[DEAD-STRIP] Removing proc_decl: std.io:read_file
[DEAD-STRIP] Removing event_decl: std.io:args
[DEAD-STRIP] Removing proc_decl: std.io:args
[DEAD-STRIP] Removing event_decl: std.io:print.ln
[DEAD-STRIP] Removing event_decl: std.io:print.impl
[DEAD-STRIP] Removing proc_decl: std.io:print.ln
[DEAD-STRIP] Removing event_decl: std.io:print.blk
[DEAD-STRIP] Removing event_decl: std.io:print.blk.impl
[DEAD-STRIP] Removing proc_decl: std.io:print.blk
[DEAD-STRIP] Removing event_decl: std.testing:test
[DEAD-STRIP] Removing proc_decl: std.testing:test
[DEAD-STRIP] Removing event_decl: std.testing:test.with_harness
[DEAD-STRIP] Removing event_decl: std.testing:test.harness
[DEAD-STRIP] Removing event_decl: std.testing:assert
[DEAD-STRIP] Removing proc_decl: std.testing:assert
[DEAD-STRIP] Removing event_decl: std.testing:assert.ok
[DEAD-STRIP] Removing proc_decl: std.testing:assert.ok
[DEAD-STRIP] Removing event_decl: std.testing:assert.fail
[DEAD-STRIP] Removing proc_decl: std.testing:assert.fail
[DEAD-STRIP] Removing event_decl: std.testing:assert.eq
[DEAD-STRIP] Removing event_decl: std.testing:assert.contains
[DEAD-STRIP] Removing event_decl: std.testing:test.property.equivalent
[DEAD-STRIP] Removing event_decl: std.deps:deps
[DEAD-STRIP] Removing proc_decl: std.deps:deps
[DEAD-STRIP] Removing event_decl: std.deps:requires.zig
[DEAD-STRIP] Removing proc_decl: std.deps:requires.zig
[DEAD-STRIP] Removing event_decl: std.control:if
[DEAD-STRIP] Removing proc_decl: std.control:if
[DEAD-STRIP] Removing event_decl: std.control:for
[DEAD-STRIP] Removing proc_decl: std.control:for
[DEAD-STRIP] Removing event_decl: std.control:capture
[DEAD-STRIP] Removing proc_decl: std.control:capture
[DEAD-STRIP] Removing event_decl: std.control:const
[DEAD-STRIP] Removing proc_decl: std.control:const
[DEAD-STRIP] Removing event_decl: std.build:requires
[DEAD-STRIP] Removing proc_decl: std.build:requires
[DEAD-STRIP] Removing event_decl: std.build:variants
[DEAD-STRIP] Removing proc_decl: std.build:variants
[DEAD-STRIP] Removing event_decl: std.build:config
[DEAD-STRIP] Removing proc_decl: std.build:config
[DEAD-STRIP] Removing event_decl: std.build:command.sh
[DEAD-STRIP] Removing event_decl: std.build:command.zig
[DEAD-STRIP] Removing event_decl: std.build:command
[DEAD-STRIP] Removing event_decl: std.build:collect
[DEAD-STRIP] Removing proc_decl: std.build:collect
[DEAD-STRIP] Removing event_decl: std.compiler_types:__compiler_types_marker
[DEAD-STRIP] Removing event_decl: input:test
[DEAD-STRIP] Removing proc_decl: input:test
[DEAD-STRIP] Stripped 72 unreachable items

[BUFFER DEBUG] After CodeEmitter.init:
[BUFFER DEBUG]   code_emitter.pos = 0
[BUFFER DEBUG]   First 50 bytes: [170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170][170]

[BUFFER DEBUG] After visitor_emitter.emit:
[BUFFER DEBUG]   code_emitter.pos = 5134
[BUFFER DEBUG]   First 50 bytes of buffer: // Access compiler flags from backend.zig via root
[BUFFER DEBUG] final_code length = 5134
[BUFFER DEBUG]   First 50 bytes of final_code: // Access compiler flags from backend.zig via root


[INTER] inter:start called with 6 contexts
[INTER] --inter flag not set, skipping
🎯 Compiler coordination: Passes: 13 (flow-based: frontend, analysis, emission)

[MAIN DEBUG] Before file write:
[MAIN DEBUG]   generated_code.len = 5134
[MAIN DEBUG]   generated_code.ptr = u8@10b9f8010
[MAIN DEBUG]   emitted_file = output_emitted.zig
[MAIN DEBUG]   emitted_file.ptr = u8@10523186e
[MAIN DEBUG]   First 50 bytes: // Access compiler flags from backend.zig via root

Test Configuration

MUST_FAIL