003 implicit destructuring shadowing

✗ Failing This test is currently failing.

Failed: backend-exec

Error Details

output_emitted.zig:22:19: error: local constant shadows declaration of 'name'

Code

// ============================================================================
// Test: Implicit destructuring shadowing
// Implicit field destructuring currently generates `const name = e.name`
// which shadows module-level `const name`. The emitter should detect this
// and generate a non-colliding name (e.g. `const __name = e.name`).
// ============================================================================
const std = @import("std");

~event greet { name: []const u8 }
| greeted {}

~proc greet {
    std.debug.print("Hello, {s}!\n", .{name});
    return .{ .greeted = .{} };
}

// Test shorthand in flow invocation
const name = "World";

// Shorthand form - should expand to greet(name: name)
~greet(name)  
| greeted |> _
input.kz

Expected Output

Hello, World!

Test Configuration

MUST_RUN