✓
Passing This code compiles and runs correctly.
Code
// Test: Cross-module event invocation with literal argument
// The literal 3000 should be emitted as 3000, not as a variable reference
~import "$app/lib/server"
~import "$std/io"
~app.lib.server:start(port: 3000)
| started _ |> std.io:println(text: "Started!")
Expected Output
Server starting on port 3000
Started!
Imported Files
// Library: defines a simple event with a port parameter
const std = @import("std");
~pub event start { port: u16 }
| started { port: u16 }
~proc start {
std.debug.print("Server starting on port {}\n", .{port});
return .{ .started = .{ .port = port } };
}
Test Configuration
MUST_RUN