No, there's no representation for generic function references in the type system. For instance, it does not have quantified types, which could represent the function you're trying to reference in a form like forall T . (T) -> Unit
.
You can only take a non-generic reference to a generic function, and for that you have to provide the concrete types in the expected type (it's taken from where the reference is assigned or passed), for example, this will work:
class A {
object B {
fun <T> foo(n: T) { }
}
}
val b: (Int) -> Unit = A.B::foo // substitutes T := Int
val c: (String) -> Unit = A.B::foo // T := String here
fun f(g: (Double) -> Unit) = println(g(1.0))
f(A.B::foo) // also allowed, T := Double inferred from the expected type