just realized my answer isn't really using the sea...
# announcements
k
just realized my answer isn't really using the sealed class. And I'm not sure how you'd want to use it, actually, because it seems like the method just returns one of those three types. In which case, your choices are: 1) return
Any
and do a check on the type 2) return
MyData<*>
and do an exhaustive
when
across the 3 subclasses, using the data as you want within the blocks, where it will be smart-casted to the proper type