https://issues.dlang.org/show_bug.cgi?id=15830
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from [email protected] --- (In reply to b2.temp from comment #0) > Maybe DMD could detect that if the call to a member function is invalid this > is maybe because it's a call to another function. > > struct Foo > { > uint _value; > alias _value this; > void test(){} > } > > void test(uint param0, string param1){} > > void main() > { > Foo foo; > foo.test(""); // want to call the free function, not the member > } That would create a case of hijacking [1]: When you later add a method `void test(string)`, then the call would silently change meaning. [1] http://dlang.org/hijack.html --
