and now I have a generics question :wink: I have ...
# announcements
b
and now I have a generics question 😉 I have a fun with this signature:
fun <T : MyType> findMyType(type: Class<T>): T
and if try to return something of type MyType, I get an error - I need to cast to T (and then I get a warning). I find it odd, since T is MyType, how come this is not allowed?