Czar
12/17/2018, 1:12 PMpublic abstract <R> java.util.concurrent.CompletableFuture<R> send(Object command)
Java call
object.send(command); nice 👍 ☕
Kotlin call
object.send<Any>(command) not nice, I'd like to avoid having to write <Any> 👎 KAndreas Sinz
12/17/2018, 1:16 PM<Any>?Czar
12/17/2018, 1:18 PM>> Type inference failed: Not enough information to infer parameter R in
fun <R : Any!> send(command: Any!): CompletableFuture<R!>!
Please specify it explicitly.spand
12/17/2018, 1:19 PMCompleteableFuture ?Czar
12/17/2018, 1:20 PMspand
12/17/2018, 1:25 PMfun <R> foo() : CompletableFuture<R> { TODO() }
val init = run {
foo()
Unit
}
Seems like a nice ease of life win to omit type on an unused return value.gildor
12/17/2018, 1:33 PMCzar
12/17/2018, 3:01 PM