Files
zig/test/cases/compile_errors/local_variable_shadowing_global.zig
2022-06-30 09:57:38 +02:00

15 lines
246 B
Zig

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