zig/test/cases/variable_shadowing.0.zig

10 lines
171 B
Zig

pub fn main() void {
var i: u32 = 10;
var i: u32 = 10;
}
// error
//
// :3:9: error: redeclaration of local variable 'i'
// :2:9: note: previous declaration here