zig/test/cases/variable_shadowing.1.zig

10 lines
170 B
Zig

var testing: i64 = 10;
pub fn main() void {
var testing: i64 = 20;
}
// error
//
// :3:9: error: local shadows declaration of 'testing'
// :1:1: note: declared here