✓
Passing This code compiles and runs correctly.
Code
// Test 408: Field name that shadows event name
//
// BUG: When an input field has the same name as the event,
// the unwrapping code `const window = e.window;` shadows the
// event struct `pub const window = struct`.
const std = @import("std");
~tor window { window: i32 } -> i32
~proc window|zig {
std.debug.print("Window size: {d}\n", .{window});
return window * 2;
}
// Invoke the event
~window(window: 42)
Actual
Window size: 42
Expected output
Window size: 42
Flows
flow ~window click a branch to expand · @labels scroll to their anchor
window (window: 42)
Test Configuration
MUST_RUN