http://d.puremagic.com/issues/show_bug.cgi?id=4702



--- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2010-12-30 
14:12:29 PST ---
OOPS!

That example code is completely wrong, please diregard it. This is the proper
one which should work but doesn't:

main.d:
import std.stdio : writeln;
import foo;     // void fun(int x)
import bar;     // void fun(long x)

void main()
{
    auto y = 10L;
    fun(y);                 // ok, goes to bar.fun

    writeln(typeid(10L));   // writes long
    fun(10L);               // error: bar.fun conflicts with foo.fun
}

foo.d:
void fun(int x)
{
}

bar.d:
void fun(long x)
{
}


This only happens with literals and when the two fun methods are defined in
separate modules. If the fun methods are defined directly in main(), there's no
error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to