You can be sure you covered all direct subclasses,...
# announcements
k
You can be sure you covered all direct subclasses, and so you `when`s definitely stay exhaustive.
d
hmm, wouldn't it make sense to restrict all subclasses? given that sealed supposed to be an "enum on steroids"
d
You can restrict all subclasses if you wish.
k
Well think about https://en.wikipedia.org/wiki/Liskov_substitution_principle, it should matter that you get a subclass because they should still behave as the parent class.