On Tuesday, 22 September 2020 at 13:19:10 UTC, Daniel Kozak wrote:
So final private functions can be overriden? It seems not, but
the sentence is definitely confusing if not just plain wrong.
Yeah. I've seen this called hiding, shadowing and overwriting
earlier, but never overriding - that's always been reserved for
the polymorphic kind.
I'd argue the documentation should use one of those other terms.
And yes compiler probably could findout that method could be
made
non-virtual but I am not sure how easy is this and how it would
slow down
compilation times
Steve showed a few posts up one example that would make it
basically impossible. Other language features make it even worse:
class A { private void fun() {} }
class B(string s) : A { mixin(s); }
--
Simen