How can I obtain a reference to a generic top leve...
# announcements
s
How can I obtain a reference to a generic top level function? ie. something like this but working:
Copy code
fun <R> foo(block: () -> R): R = TODO()

val fooName = ::foo.name
e
You cannot. That’s the side-effect of the fact that function types in Kotlin cannot have type parameters: https://youtrack.jetbrains.com/issue/KT-34470
s
I see. Thanks.