i have an interface with generics: ``` @Function...
# announcements
t
i have an interface with generics:
Copy code
@FunctionalInterface
interface FromJsonMapper {
    fun <T> map(json: String, targetClass: Class<T>): T
}
in Java i can use this as a method reference.
gson::fromJson
is a valid argument if a method has a
FromJsonMapper
param. in kotlin i seem to be stuck having to do
Copy code
object : FromJsonMapper {
    override fun <T> map(json: String, targetClass: Class<T>): T {
        return gson.fromJson(json, targetClass)
    }
}
am i missing something?