Massimo Carli
11/08/2018, 11:24 AMString::class is KClass<String> while the type of "Hello"::class is KClass<out String>? This means that what "Hello"::class returns is a KClass<T> where T is a subtype of String. But String is final and it doesn't have subtypes. 🤔karelpeeters
11/08/2018, 12:03 PMMassimo Carli
11/08/2018, 3:24 PMval jClazz: Class<String> = String.javaClass
doesn't compile because it's expecting a Class<String> while String.javaClass is a Class<String.Companion>. When you remove the explicit type and get
val jClazz = String.javaClass
it compiles and the inferred type is....Class<String>.