<@U5QGY080J> not sure what you're after, but you c...
# announcements
a
@iex not sure what you're after, but you could do something like this:
Copy code
sealed class Foo<T> : List<T> 
class Ints(list: List<Int>) : Foo<Int>(), List<Int> by list
class Strings(list: List<String>) : Foo<String>(), List<String> by list

fun <T> test(x: Foo<T>): Int {
    return when (x) {
        is Ints -> 1
        is Strings -> 2
    }
}

fun main(args: Array<String>) {
    println(test(Ints(emptyList())))
    println(test(Strings(emptyList())))
}