aboutsummaryrefslogtreecommitdiff
path: root/test/cases/variable_shadowing.10.zig
blob: 6aa9f5a9bfd703beceb992da278207f38c17a642 (plain)
1
2
3
4
5
6
7
8
9
fn foo() !void {
    var i: anyerror!usize = 1;
    _ = i catch |i| return i;
}

// error
//
// :3:18: error: redeclaration of local variable 'i'
// :2:9: note: previous declaration here