"bearophile"  wrote in message news:[email protected]...

Andrei has decided to not introduce "final by default" because he thinks it's a too much large breaking change. So your real world data is an essential piece of information to perform an informed decision on this topic (so much essential that I think deciding before having such data is void decision). So are you willing to perform your analysis on some other real D code? Perhaps dub?

If anyone wants to try this out on their code, the patch I used was to add this:

if (ad && !ad->isInterfaceDeclaration() && isVirtual() && !isFinal() &&
!isOverride() && !(storage_class & STCvirtual) && !(ad->storage_class & STCfinal))
{
   warning(loc, "virtual required");
}

Around line 623 in func.c (exact line doesn't matter, just stick it in with the rest of the checks)

I also had to disable the "static member functions cannot be virtual" error.

Reply via email to