Hey folks :wave: Wondering if `reified inlined fun...
# multiplatform
r
Hey folks 👋 Wondering if
reified inlined function
is not yet supported in KMP for iOS? Basically I have wrapped
Json.nonstrict.parseList
in a different function which looks like
inline fun <reified T : Any> listParser(): List<T> { ... }
. It’s crashing on iOS saying
Uncaught Kotlin exception: kotlin.IllegalStateException: unsupported call of reified inlined function
though it’s working fine on Android. Just wanted to check if it’s not supported or am I doing something wrong 😅
j
Hi! It looks like you’re trying to call a
reified inline function
from ObjC/Swift explicitly, are you not? It’s not safe since the compiler doesn’t know type argument
T
at the callsite.
r
Yeah, though looks like I don’t need to use
Json.parseList()
anymore, there’s another way to parse a json to a list via
Json.parse(someDeserializer().list)
which doesn’t need
reified
declaration so no more crashing 🙂
👍 1
Here’s the source ––

https://www.youtube.com/watch?v=IhKTIFlNrC4&amp;t=299s

204 Views