zig/doc/langref/test_shadowing.zig

11 lines
179 B
Zig

const pi = 3.14;
test "inside test block" {
// Let's even go inside another block
{
var pi: i32 = 1234;
}
}
// test_error=local variable shadows declaration