jargon

Design patterns·The named ways it goes wrong

the subclass overrides three inherited methods to throw, because it never wanted them in the first place.

Refused bequest

Also calledrefused bequest smell, unwanted inheritance

A subclass that inherits behaviour it does not want and rejects it, usually by overriding to do nothing or to raise. It is a Liskov substitution violation with a name: callers holding the parent type will call those methods and get a failure the type system promised could not happen. The fix is nearly always composition, or extracting the genuinely shared part into a smaller interface.

Commonly confused with