✓
Passing This code compiles and runs correctly.
Code
// Test: Using [keyword] event without module qualification
import lib
// Using greet instead of lib:greet because lib defines [keyword]pub event greet
greet(name: "World")
Supporting Files
// JavaScript implementation facet. The Koru declarations live in the
// `lib.kz` companion (merged at import); this file holds the `|js`
// proc bodies mirroring its `|zig` ones.
~proc greet|js {
console.log(`Hello, ${name}!`);
}
// A library with a [keyword] event that can be called unqualified
~[keyword]pub tor greet { name: string }
~proc greet|zig {
const std = @import("std");
std.debug.print("Hello, {s}!\n", .{name});
}
Actual
Hello, World!
Expected output
Hello, World!
Flows
flow ~greet click a branch to expand · @labels scroll to their anchor
greet (name: "World")
Test Configuration
MUST_RUN
koru.json:
{
"paths": {
"std": "../../../../../koru_std",
"lib": "./lib.kz"
}
}