In kotlin for now fun <T> T.foo(block:(T)-&g...
# getting-started
s
In kotlin for now fun <T> T.foo(block:(T)->Unit):Unit = block(this) here type parameter T is nullable why not make it not-nullable implicitly?
a
You need to specify explicitly that you need a non nullable
fun <T:Any> T.foo(block: (T)->Unit) = block()
1