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

           Summary: overload resolution of &x.g() incorrectly chooses
                    delegate over function pointer
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: clugd...@yahoo.com.au


--- Comment #0 from Don <clugd...@yahoo.com.au> 2012-10-22 06:20:51 PDT ---
..or vice versa.
Reported by kenji in the pull request for bug 8257.
https://github.com/D-Programming-Language/dmd/pull/1194
-----
struct S8257 {
    void g(int n){} // before the static one
    static int g() { return 6; }
}
void main() {
     auto k = &(func()).g;
     pragma(msg, typeof(k));  // prints void delegate(int n)
}

It always chooses the first function declaration.

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

Reply via email to