https://kotlinlang.org logo
#announcements
Title
# announcements
j

jlleitschuh

10/03/2017, 10:09 PM
Copy code
interface SwitchMessageConverterKotlin<T>  {
    val supportedType: Class<T>
        get() = supportedKlass.java

    val supportedKlass: KClass<T> // Anyone know why the compiler complains about this `T`?
}
i

ilya.gorbunov

10/04/2017, 4:31 AM
The type parameter of
KClass
is constrained to be non-nullable type. You need to add constraint
T : Any
2 Views