www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - TDPL: Inheritance

Page 191:

unittest {
    Friend f = new Friend;
    Contact c = f;              // substitute a Friend for a Contact
    auto color = c.bgColor();   // call a contact method
}

Fix to: "call a Friend method"
Aug 08 2010