zig/test/cases/variable_shadowing.1.zig

10 lines
179 B
Zig

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