Is it a known issue that we can’t call inline reif...
# kotlin-native
k
Is it a known issue that we can’t call inline reified function as a method reference in Kotlin Native, because it causes
unsupported call of reified inlined function
? Example in thread
Copy code
private inline fun <reified T> encodeToString(any: T): String = any.toString()

val any = 8
any.let(::encodeToString)
it causes:
Uncaught Kotlin exception: kotlin.IllegalStateException: unsupported call of reified inlined function
encodeToString
which is a little bit surprising for me, because I didn’t know about such limitation
Using
encodeToString
like that:
Copy code
any.let { encodeToString(it) }
works as expected