✓
Passing This code compiles and runs correctly.
Code
// Test 202b: Shadowing behavior - compiler forbids duplicate binding names
// This test confirms that Koru does NOT allow binding shadowing.
//
// Expected: This should compile and run successfully with unique binding names.
// If this test passes, it proves shadowing is forbidden (changing 'd' to 'r' breaks it).
const std = @import("std");
~tor first { value: i32 } -> i32
~proc first|zig {
return value * 2;
}
~tor second { value: i32 } -> i32
~proc second|zig {
return value * 3;
}
~tor show { outer_val: i32, inner_val: i32 }
~proc show|zig {
std.debug.print("Outer: {}, Inner: {}\n", .{outer_val, inner_val});
}
// Test: Use unique binding names (r and d)
~first(value: 10): r |> second(value: r): d |> show(outer_val: r, inner_val: d)
Actual
Outer: 20, Inner: 60
Expected output
Outer: 20, Inner: 60
Flows
flow ~first click a branch to expand · @labels scroll to their anchor
first (value: 10)
Test Configuration
MUST_RUN