Inheritance of purity

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Feb 25 12:21:17 PST 2012


On 2/25/12 11:57 AM, Timon Gehr wrote:
> On 02/25/2012 06:53 PM, deadalnix wrote:
>> class A {
>> void fun() const { ... }
>> }
>>
>> class B : A {
>> override void fun() { ... }
>> }
>>
>> Now I change the class A to become :
>>
>> class A {
>> void fun() const { ... }
>> void fun() { ... }
>> }
>>
>> And suddenly, the override doesn't override the same thing anymore.
>> Which is unnacceptable.
>
> You didn't try to actually compile this, did you? ;D

Apparently me neither.

Andrei


More information about the Digitalmars-d mailing list