mzgreen
10/12/2016, 6:42 AMinline fun <reified T> foo() {
when(T::class) {
Long::class -> {}
String::class -> {}
}
}
Is there any better way to express the same thing? Basically I would like to check if T is some type. Is it possible to do it without reflection?