David Glasser
01/22/2020, 7:35 PMinline fun <T : Any> foo(X<T>): List<T> {
return objectMapper.readValue(xxx)
}
inline fun <reified T> ObjectMapper.readValue(content: String): T = ... # from jackson kotlin
How does the compiler create the reification of the T in the nested function if it's not reified in the outer function?Casey Brooks
01/22/2020, 7:49 PMList, not T. It can determine that statically, since the readValue() is the return type of foo, which is ListDavid Glasser
01/22/2020, 7:59 PMDavid Glasser
01/22/2020, 7:59 PMinline from my own function