KamilH
04/13/2021, 5:56 AMunsupported call of reified inlined function
? Example in threadKamilH
04/13/2021, 5:57 AMprivate 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 functionwhich is a little bit surprising for me, because I didn’t know about such limitationencodeToString
KamilH
04/13/2021, 5:58 AMencodeToString
like that:
any.let { encodeToString(it) }
works as expected