[Issue 6263] New: Ambiguous declaration using typeof and an overloaded function is accepted.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 7 00:13:57 PDT 2011


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

           Summary: Ambiguous declaration using typeof and an overloaded
                    function is accepted.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: blood.of.life at gmail.com


--- Comment #0 from Bernard Helyer <blood.of.life at gmail.com> 2011-07-07 00:08:54 PDT ---
int add(int a, int b) { return a + b; }
int add(int a, int b, int c) { return a + b + c; }

void main()
{
    typeof(&add) a;
}

---

I believe the above should error just like

---
auto a = &add;
---

Does.

-- 
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