RxKotlin icon indicating copy to clipboard operation
RxKotlin copied to clipboard

withLatestFrom() build error with RxKotlin 2.4.0

Open GrahamBorland opened this issue 6 years ago • 1 comments

I just updated RxKotlin from 2.3.0 to 2.4.0 and this code no longer compiles.

Observable.just(Unit)
    .withLatestFrom(this) { _, item: T -> item }

Now I have to write

Observable.just(Unit)
    .withLatestFrom(this, BiFunction<Unit, T, T> { _, item -> item })

Kotlin 1.3.41.

Possibly related to #196?

GrahamBorland avatar Jul 30 '19 15:07 GrahamBorland

@GrahamBorland Not sure if this fixes the issue for you, but we needed to have our generic T type be <T : Any>.

colinrtwhite avatar Oct 04 '19 00:10 colinrtwhite