Closed
Description
fn foo(a: int, a: bool) {
println(fmt!("%?", a));
}
fn main() {
foo(42, false);
}
I expect this to fail to compile on account of the duplicated argument name. Instead:
<anon>:1:7: 1:8 warning: unused variable: `a` [-W unused-variable (default)]
<anon>:1 fn foo(a: int, a: bool) {
^
And running it writes false
. The first argument is wholly inaccessible.