zig/test/cases/variable_shadowing.5.zig

11 lines
173 B
Zig

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