Recursive attribute for virtual functions?

12345swordy alexanderheistermann at gmail.com
Tue Mar 27 20:39:26 UTC 2018


For example

class A
{
     @recursive @safe void talk()
     {
         writeln("Hi");
     }

}
class B : A
{
     override void talk() // @safe attribute added by recursive 
attribute and can not be removed
     {
         writeln("Bye");
     }
}

I have notice that potential bugs can slip by the compiler during 
compile time, and I purpose this as way to counter them.

Alex


More information about the Digitalmars-d mailing list