https://kotlinlang.org logo
e

enleur

12/27/2016, 10:19 PM
like this?
Copy code
fun <T> foo2(factory: () -> T) {
    var entity: T = factory()
}

fun test() {
    foo2(::Object)
}