The following peace of code doesn't not compile using D2:

class Base
{
    synchronized void func (string s) { }
    synchronized void func (Object o) { }
}

class Foo : Base
{
    synchronized override void func (string key) { super.func(key); }
}

The compiler gives this error:

main.d(13): Error: function main.Base.func (string s) shared is not callable using argument types (string) main.d(13): Error: cannot implicitly convert expression (key) of type string to object.Object

If I remove "synchronized" from the method declarations I don't get this error. What have I missed?

--
/Jacob Carlborg

Reply via email to