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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 3 07:01:09 PST 2012


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



--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> 2012-03-03 07:01:05 PST ---
I think this is almost same as issue 3757, and I think additional overload in
derived class is useful and should work.

Example:

// after fixing object const correctness (bug 1824)
class Object {
    bool opEquals(const Object o);
    //...
}
class C {
    alias super.opEquals opEquals;

    // additional overload for mutable object equality
    override bool opEquals(Object o) {
        // special processing, e.g. caching
        return super.opEquals(o);
    }
}

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