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

           Summary: Potentially ambiguous overloaded call
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2012-05-24 15:02:39 PDT ---
This is just a potential enhancement request. It's not an enhancement request
because I am not sure about it.

A thread started by Andrej Mitrovic on D.learn:
http://forum.dlang.org/thread/mailman.1043.1337863952.24740.digitalmars-d-le...@puremagic.com

In dmd 2.060alpha this code compiles and doesn't assert at run-time, so it
calls the second overload:


struct Foo {}
void test(void* test) { assert(0); }
void test(Foo* test) {}
void main() {
    test(null);
}


As Andrej comments, shouldn't this be considered an ambiguous call, and refused
at compile time?

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

Reply via email to