burg
04/02/2018, 11:55 PMsandeep
04/03/2018, 6:03 AMAny
is inherited from Any?
(?) at least as per the diagram belowhttp://natpryce.com/articles/000818/entire-hierarchy.png▾
test2<String?>()
doesn’t work (as T is bounded by Any)inline fun <reified T> test3(): KClass<T> = T::class // does not compile
doesn’t compile is since T is unbounded but the T of KClass is bounded by Any
burg
04/03/2018, 3:48 PMString?::class
actually return the same as String::class
(and it does, at some level, if you look at how test1 works in my example).louiscad
04/04/2018, 5:52 AM