Summary: Overriding const member function in conjunction with
                    mutable overload causes a strange error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD

--- Comment #0 from Kenji Hara <> 2012-07-09 21:26:12 PDT ---
I think this problem blocks 2.060 release.

class C {
    // overrides Object.opEquals
    bool opEquals(const Object o) const {}

    // introduce mutable overload
    bool opEquals(const Object o) {}  // line8
void main(){}

test.d(8): Error: function test.C.opEquals multiple overrides of same function

The second opEquals should *introduce* new member function. But, by the const
attribute inference, it is determined as *multiple overrides".

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to