Purity, @safety, etc., in generic code
kenji hara
k.hara.pg at gmail.com
Fri Feb 22 07:14:47 PST 2013
2013/2/23 deadalnix <deadalnix at gmail.com>
> class A {
> void foo() {}
> }
>
> class B {
> override void foo() const {}
> }
>
> Add a const foo method to A, and B;foo don't overload the same method
> anymore.
>
B.foo overrides A.foo. It is properly allowed as a particular case in
contravariant parameter type.
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130223/ba405c3c/attachment.html>
More information about the Digitalmars-d
mailing list