https://issues.dlang.org/show_bug.cgi?id=144
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #4 from RazvanN <[email protected]> --- This is not a bug, it's the desired behavior since alias is used to include functions in the same overload set. It can't issue an error when an alias has the same name as a function, otherwise it would be impossible to bring other functions to the overload set. For example: if you have 3 foo overloads: void foo() {} void foo(int a) {} void foo(int a, int b) {} and you want to bring an imported function in the same overload set you do: alias foo = path.to.import.foo The problem in your example is that the 2 functions you bring in the same overload set have the exact same signature and are in the same file. So the compiler let's alias your function because it thinks you want to have the in the same overload set, but when you try to call it, it issues an error because it does not know which one it should call. This is correct behavior. Closing as invalid. --
