[Issue 144] Alias and function names fail to collide
https://issues.dlang.org/show_bug.cgi?id=144 RazvanN changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC||razvan.nitu1...@gmail.com Resolution|--- |INVALID --- Comment #4 from RazvanN --- 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. --
[Issue 144] Alias and function names fail to collide
https://issues.dlang.org/show_bug.cgi?id=144 Andrei Alexandrescu changed: What|Removed |Added Assignee|bugzi...@digitalmars.com|nob...@puremagic.com --
[Issue 144] Alias and function names fail to collide
https://issues.dlang.org/show_bug.cgi?id=144 Andrei Alexandrescu changed: What|Removed |Added Keywords||bootcamp --
[Issue 144] Alias and function names fail to collide
https://issues.dlang.org/show_bug.cgi?id=144 Andrei Alexandrescu changed: What|Removed |Added Target Milestone|2.059 |--- Version|D1 & D2 |D2 --
[Issue 144] Alias and function names fail to collide
http://d.puremagic.com/issues/show_bug.cgi?id=144 edmcc...@verizon.net changed: What|Removed |Added CC||edmcc...@verizon.net --- Comment #3 from edmcc...@verizon.net 2012-07-13 13:23:26 PDT --- There is an order dependency: void gm(){assert(0);} alias gm fn; void fn(){assert(0);} and fnp points to gm, but void gm(){assert(0);} void fn(){assert(0);} alias gm fn; and then fnp points to fn. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 144] Alias and function names fail to collide
http://d.puremagic.com/issues/show_bug.cgi?id=144 Jesse Phillips changed: What|Removed |Added CC||jesse.k.phillip...@gmail.co ||m Target Milestone|--- |2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 144] Alias and function names fail to collide
http://d.puremagic.com/issues/show_bug.cgi?id=144 Michal Minich changed: What|Removed |Added CC||michal.min...@gmail.com --- Comment #2 from Michal Minich 2010-12-09 04:55:24 PST --- The bug still exists in DMD 2.050 fnp allays points to function fn; order has no effect. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 144] Alias and function names fail to collide
http://d.puremagic.com/issues/show_bug.cgi?id=144 Andrei Alexandrescu changed: What|Removed |Added Status|NEW |ASSIGNED CC||and...@metalanguage.com AssignedTo|nob...@puremagic.com|bugzi...@digitalmars.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---