Inheritance of purity

Walter Bright newshound2 at digitalmars.com
Sat Feb 25 12:44:46 PST 2012


On 2/25/2012 9:53 AM, deadalnix wrote:
> And suddenly, the override doesn't override the same thing anymore. Which is
> unnacceptable.

class A {
     void fun() const {  }
     void fun() {  }
}

class B : A {
     override void fun() {  }
}

----

dmd -c foo
foo.d(6): Error: class foo.B use of foo.A.fun() hidden by B is deprecated


More information about the Digitalmars-d mailing list