[Issue 7560] New: Expanding inherited overload sets gives error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 21 19:33:34 PST 2012


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

           Summary: Expanding inherited overload sets gives error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: blm768 at gmail.com


--- Comment #0 from blm768 at gmail.com 2012-02-21 19:33:31 PST ---
I've been working on a project that involves overloading and inheritance and
I've run into a bit of a problem. My code looks something like this:

class Base {
    void get(ubyte b);
}

class Derived: Base {
    alias Base.get get;
    void get(string s);
}

When I try to compile it, DMD says that the alias Derived.get conflicts with
Derived.get(string). This behavior makes sense to a degree (declaring
get(string) is creating a new overload instead of overriding an old one), but
it's probably not what anyone wants. It should be a fairly simple fix; just a
little special-case code in DMD for this type of alias or something...

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