Why should I have print()? Why should I dereference b? A and B are completely different classes, they do not have a common interface at all, and do not have a common base class. LSP says nothing about polymorphism, it is about subobjects. LSP: Objects of a superclass should be replaceable with objects of its subclasses without altering the correctness of the program.