Skip to main content

One doc tagged with "contracts"

View all tags

Chapter 9: LSP — The Liskov Substitution Principle

If S is a subtype of T, objects of type S must be substitutable for objects of type T without altering the correctness of the program. LSP governs not just inheritance but any interface contract — and its violation breaks architectural boundaries.