about summary refs log tree commit diff
path: root/lang/zig/shadow.zig
blob: 9a37722fcdc60329b5371f86418e4d703cf498ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
test "separate scopes" {
    { const pi = 3.14; }
    { var pi: bool = true; }
}

test "inside test block" {
    // That's right, no shadowing.
    const pi = 3.14;
    { var pi: i32 = 1234; }
}