✓
Passing This code compiles and runs correctly.
Code
// Test: Expression implicit mapping under EXPLICIT comptime.
// Verifies that Expression args with dots (like 'data.value > 10') correctly
// map to the implicit 'expr' param.
//
// NOTE: `Expression` no longer auto-adds `[comptime]`. Representation (a
// captured source string) and timing (when the event runs) are orthogonal
// axes; coupling them wrongly flipped runtime-emitting keyword templates
// (~if/~for) to pure-comptime. Comptime is now explicit — an event that
// splices its captured expression at compile time declares `[comptime]`.
const std = @import("std");
~[comptime]tor check-expr { expr: Expression }
// Proc receives expr as []const u8
~proc check-expr|zig {
std.debug.print("Expression: {s}\n", .{expr});
}
// Test: Expression with dotted access - should map to 'expr' field
// Before fix: 'data.value > 10' was parsed as name='value > 10', value='data.value > 10'
// After fix: name='expr', value='data.value > 10'
const data = .{ .value = 42 };
~check-expr(data.value > 10)
Flows
flow ~check-expr click a branch to expand · @labels scroll to their anchor
check-expr (expr: data.value > 10)
Test Configuration
MUST_RUN