Landry Norris
07/12/2022, 7:30 PMephemient
07/12/2022, 7:39 PMKClass
is generic erasure, not typedef. try KType
,
typeOf<X>()
Landry Norris
07/12/2022, 7:41 PMephemient
07/12/2022, 7:47 PMLandry Norris
07/12/2022, 7:50 PMwhen(type) {
typeOf<jstring> -> "String"
typeOf<jobject> -> "Object"
}
and pass in typeOf<jobject>, it returns “String”ephemient
07/14/2022, 9:54 PMtypedef jobject jstring
in jni.h
. so they are 100% indistinguishable in C and in Kotlin.Landry Norris
07/14/2022, 10:00 PMephemient
07/14/2022, 10:03 PMtypedef
doesn't really exist, you can think of every usage as being immediately substituted before compilationLandry Norris
07/14/2022, 10:18 PM