groostav
01/06/2017, 6:50 PMasync
, and the syntax does not allow you to provide it explicitly.
In short:
@Test fun `when forward composing should infer types correctly`(): CompletableFuture<Int> = ::async<Int> forwardCompose wrapper { 42 }
fun <T> async(block: () -> T): CompletableFuture<T> = TODO();
fun <T> wrapper(block: () -> T): T = TODO();
wont compile