'override' question

kris foo at bar.com
Mon Feb 5 19:24:02 PST 2007


given a base class with method write():

# protected uint write() {printf("base\n");}
#
# void func()
# {
#    write ();
# }
#

And subclass Sub with method write():

# private override uint write() {printf("sub\n");}


What should happen (a) at compile time, and (b) at runtime when invoking 
Sub.func?



More information about the Digitalmars-d mailing list