zig/test/cases/variable_shadowing.4.zig

11 lines
171 B
Zig

pub fn main() void {
var i = 0;
for ("n") |i| {
}
}
// error
//
// :3:16: error: redeclaration of local variable 'i'
// :2:9: note: previous declaration here