Refused Bequest

When a subclass inherits methods and fields from their parents, but doesn’t need them. It’s often a sign that the subclass is not substitutable for its parent class. In that case it has broken the Liskov Substitution Principle.

Sources

  • This smell is included Martin Fowler's book "Refactoring", 2nd Edition

Back to All Code Smells