https://issues.dlang.org/show_bug.cgi?id=14161
--- Comment #8 from Ketmar Dark <[email protected]> --- i don't think that shadowing globals should always generate warning. i believe that it's enough to generate warning only when there is possible UFCS shadowing. so: import std.stdio; void foo(int a) { writeln("it's a function! : ", a); } void main() { auto foo = (int a) { writeln("It's a variable! : ", a); }; //5.foo(); foo(5); } no warning. but with uncommented `5.foo();` there should be a warning. shadowing global functions with locals is not a big deal in a good written code, but remembering that UFCS ignores locals and picks globals instead is something that should better be told by the compiler. --
