aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/local_variable_shadowing_global.zig
blob: 1320bfcb41fd56c1d0cf895b339a6f58ad9cedcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const Foo = struct {};
const Bar = struct {};

export fn entry() void {
    var Bar : i32 = undefined;
    _ = Bar;
}

// error
// backend=stage2
// target=native
//
// :5:9: error: local shadows declaration of 'Bar'
// :2:1: note: declared here