slang
slang copied to clipboard
Shadowing of argument should be an error (at least opt-in to do so)
I have a function like that because of a faulty merge conflict resolution
void foo(inout Bar bar)
{
Bar bar;
InitBar(bar);
// …
}
Took me a long time to figure it out in a large code base.
It would be really nice if this is in error (yeah, it is valid spec, but if anyone wants to make that on purpose, maybe just not allow them). Or, if there is an opt-in option to do so, it will be good enough.
Good one to fix as part of our lang cleanup in q3