✓
Passing This code compiles and runs correctly.
Code
// TEST: Uncalled event without proc should compile fine
//
// Events declared but never invoked should not require a proc.
// This allows "interface" style declarations.
~import std/io
// Event with no proc and mismatched input/output - but never called
~pub event unused-event { x: i32 }
| result []const u8
// A real event that IS called
~pub event greet {}
~proc greet|zig {
std.debug.print("hello\n", .{});
}
const std = @import("std");
~greet()
Output must match:
hello