[Issue 7534] New: Allow attribute-overloading of an overridden method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 17 11:34:47 PST 2012


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

           Summary: Allow attribute-overloading of an overridden method
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-02-17 11:34:45 PST ---
Also see: http://d.puremagic.com/issues/show_bug.cgi?id=3757

class C{
    void foo(){}
}
class D : C{
    override void foo(){}
    void foo()const{}
}

Currently this is illegal. Both child class methods are assumed to override the
parent class method:

Error: D.foo multiple overrides of same function 

Only the first child class method should override the parent class method and
the second child class method would introduce an additional overload on const.

Similar observations apply to shared/immutable/inout functions.

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