"Square is-a Rectangle", the classic example of inheritance failing, doesn't fail when the objects are immutable. I never noticed before.
Conversation
1
Replying to
Fails Liskov substitution because the domain of setSize() is smaller on Square than on Rectangle.
Replying to
How would one following that constraint implement collection class or number class hierarchies, etc?


