aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/local_variable_redeclares_parameter.zig
blob: f49b7f137e8d5c5b2c9dc73249ef2862213b98fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn f(a: i32) void {
    const a = 0;
}
export fn entry() void {
    f(1);
}

// error
// backend=stage2
// target=native
//
// :2:11: error: local constant 'a' shadows function parameter from outer scope
// :1:6: note: previous declaration here