On 2015-02-28 22:12, Andrei Alexandrescu wrote:
Defines a significantly better function call protocol:

http://wiki.dlang.org/DIP74

Is there any checking that the signatures of these methods matches the ones in the base class if an implicit conversion to the base class is made? Example:

class Base
{
    void opAddRef();
    void opRelease();
}

class Sub : Base
{
    int opAddRef();
    int opRelease();
}

Base b = new Sub; // what happens here?

On all examples showing how the compiler will insert calls to "opAddRef" and "opRelease" the return value is ignored. Is there a point in returning anything form these methods?

--
/Jacob Carlborg

Reply via email to