www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14509] New: Can't override Object methods in synchronized

https://issues.dlang.org/show_bug.cgi?id=14509

          Issue ID: 14509
           Summary: Can't override Object methods in synchronized classes
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: public dicebot.lv

===
synchronized class A
{
    override equals_t opEquals(Object rhs) { return 0; }
}
===
Error: function test.A.opEquals does not override any function, did you mean to
override 'object.Object.opEquals'?


There does not seem to be any way to override Object methods in synchronised
classes as those become implicitly shared.

--
Apr 26 2015