aboutsummaryrefslogtreecommitdiff
path: root/test/cases/variable_shadowing.3.zig
blob: af16bccc1478ca509cd68aaa75c549872df8ab81 (plain)
1
2
3
4
5
6
7
8
9
pub fn main() void {
    var i = 0;
    for ("n", 0..) |_, i| {}
}

// error
//
// :3:24: error: capture 'i' shadows local variable from outer scope
// :2:9: note: previous declaration here