Paul Woitaschek
12/03/2018, 2:08 PMAny
but the subtypes are not directly related so they can't be sealed classes.Alan Evans
12/03/2018, 2:20 PMsealed class Wrapper{
class TypeA(val value: A): Wrapper()
class TypeB(val value: B): Wrapper()
...
}
Alan Evans
12/03/2018, 2:21 PMList<Wrapper>
and get the exhaustive when
you probably are after.Alan Evans
12/03/2018, 2:23 PMWrapper
but I don't know your domain.Paul Woitaschek
12/03/2018, 2:27 PMPaul Woitaschek
12/03/2018, 2:27 PMAlan Evans
12/03/2018, 3:15 PMPaul Woitaschek
12/03/2018, 3:25 PMAlan Evans
12/03/2018, 3:55 PMAlan Evans
12/03/2018, 3:59 PM