Michael de Kaste
12/10/2021, 12:25 PMMichael de Kaste
12/10/2021, 12:28 PMsealed interface Type{
@JvmInline value class Incomplete(val list: List<Char>) : Type
@JvmInline value class Illegal(val char: Char) : Type
}
My function returns this Type. Now for part one, I'd want the illegal parts of this list, and for part two I want the incomplete parts. My assumption is that you can just map it to a map, and because sealed classes have known subclasses, you should just be able to do map[Illegal] or map[Incomplete]. But now I have to do that, but still filter the instances of the values to the correct typesPaul Woitaschek
12/10/2021, 3:02 PMMichael de Kaste
12/10/2021, 3:13 PMephemient
12/10/2021, 5:10 PM