DIP74 updated with new protocol for function calls
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sun Mar 1 05:06:42 PST 2015
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
More information about the Digitalmars-d
mailing list