A subclass inherits methods or fields it doesn't actually use — overriding to no-ops, throwing 'unsupported', or just ignoring the inheritance.
A subclass overrides parent methods with no-ops or 'unsupported' throws; code generated against the parent's interface that calls the inherited method against this subclass produces a runtime failure the type checker accepted.
Sharing happens through composition (a delegate object) rather than forced inheritance.
Behavior reuse runs through a held collaborator instead of through inheritance; generated code that calls a method on a reference type runs the method the type's signature promises.
Smellier version
class Animal { fly() {} swim() {} }class Dog extends Animal {fly() { throw new Error('no'); }}
Fresher version
class Dog {// composes a Mover delegate that knows it's a swimmer}
Liskov violations: callers can't trust subclass instances to honor the parent contract; polymorphism becomes a trap.
Liskov violations: the agent cannot trust subclass instances to honor the parent contract, so polymorphism becomes a trap that the agent must defensively check at every call site.
Replacing inheritance with composition is more verbose at construction sites and removes the syntactic polymorphism inheritance provided; consumers that rely on `instanceof` checks or shared base methods need explicit migration.
Composition is more verbose at construction; the agent loses syntactic polymorphism and must verify behavior through explicit delegation calls instead of relying on inheritance dispatch.
Each class has only what it needs; surprises in polymorphic use disappear.
Code generated against a reference type's interface executes the methods that type defines; calls dispatched against the type signature do not silently fall through to no-op overrides.
Replacing every inheritance relationship with composition, including ones where the Liskov contract genuinely holds — pays construction-site verbosity for no real fit improvement.
Replacing inheritance with composition on hierarchies where every subclass honors the parent's contract adds forwarding methods at every site without changing what the agent's generated calls do; the tokens spent on the rewrite buy no behavioral guarantee the inheritance did not already provide.