[Issue 7549] typeof of overloaded function picks the lexically first one

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 3 07:00:20 PST 2013


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


Andrei Alexandrescu <andrei at erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at erdani.com


--- Comment #4 from Andrei Alexandrescu <andrei at erdani.com> 2013-02-03 07:00:13 PST ---
Let me add one more case that doesn't involve any property-related stuff:

unittest
{
    class C1 {
        int fun(string) { return 1; }
        int fun() { return 1; }
    }
    auto c1 = new C1;
    writeln(typeof(&c1.fun).stringof);
}

This should fail with ambiguity error, but actually prints the type of the
first overload.

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


More information about the Digitalmars-d-bugs mailing list