https://issues.dlang.org/show_bug.cgi?id=2789
Rob T <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #15 from Rob T <[email protected]> --- This bug report may be related or a duplicate https://issues.dlang.org/show_bug.cgi?id=13283 The problem persists in dmd v2.067.1 It is particularly nasty since even the linker won't catch it in some cases. For example: main_lib.d --------------------------- module main_lib; import std.stdio; alias t_TaskFunction = void function(); // duplicate overloads that should not compile void Task(){ writeln("A"); } void Task(){ writeln("B"); } main.d --------------------------- import main_lib; int main() { t_TaskFunction TaskFunction = &Task; // ??? TaskFunction(); return 0; } $dmd main_lib.d -lib -O -oflibmain_lib.a $dmd main2.d -O -L-L./ -L-lmain_lib -ofmain $./main Output is "A" on my system. --
