are there some issues when calling functions with ...
# announcements
r
are there some issues when calling functions with reified type parameters in multiple steps where type information is lost ?
Copy code
foo<T>()

inline fun <reified T> foo(): T? {
    return bar<T>()
}

inline fun <reified T> bar(): T? {
    return objectMapper.readValue<T>(x)
}
Something like the above
t
not exactly sure what you mean, but type information can't be lost in reified functions, no matter how deep you chain the calls. The point is basically that reified type parameters can only exist in inline functions, which don't really exist anymore after the compiler inlined them. The code runs in the same scope as the calling function. So no matter how many layers of inline functions you use, it will just be a single function body in compiled code, which doesn't miraculously lose information.
r
I had an issue where a similar construction with reified types caused jackson objectmapper to deserialise everything to an untyped LinkedHashMap. Let me see if I can create an isolated reproducer