ReactiveX / RxKotlin

RxJava bindings for Kotlin
Apache License 2.0
7.04k stars 455 forks source link

SAM Issue Resolved with Upcoming Type Inference Overhaul #197

Open thomasnield opened 6 years ago

thomasnield commented 6 years ago

At KotlinConf 2018, a new type inference system was announced and it will fix the SAM issue. I believe this is going to be in experimental stages for some time and is slated for Kotlin 1.4.

I am documenting this right now so we'll remember to deprecate the SAM helper functions upon the release of this much-needed feature.

stepango commented 6 years ago

Guys from Kotlin announced Experimental mechanism for libraries same as for compiler experimental features. Probably we could use it to support new type inference.

thomasnield commented 6 years ago

I kept looking for a timeline for this, did they announce any?

thomasnield commented 6 years ago

It looks like this is available as an experimental feature in Kotlin 1.3. Here is how to activate it: https://discuss.kotlinlang.org/t/new-type-inference-in-kotlin-1-3-0-rc-190/9914/2

bubenheimer commented 4 years ago

This produces warnings now when building with Kotlin 1.4.0 and RxKotlin 3.0.0, due to several candidates being available:

Candidate resolution will be changed soon, please use fully qualified name to invoke the following closer candidate explicitly

Edit: The case I encountered was readily fixed by removing the extension function import. My bad.

vpriscan commented 4 years ago

@bubenheimer this has been handled on the 3.x-new-type-inference branch, will merge to main branch soon.

vpriscan commented 4 years ago

238 deprecates SAM helper functions

victorMontero commented 4 years ago

How u can unsubscribe from this list!? I’ve tried so many ways:(

On Wed, 26 Aug 2020 at 17:13 Vedran Prišćan notifications@github.com wrote:

238 https://github.com/ReactiveX/RxKotlin/pull/238 deprecates SAM

helper functions

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ReactiveX/RxKotlin/issues/197#issuecomment-681127148, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL45BY6V73LIQ7BZDQ2J2XLSCV3JLANCNFSM4FZNEGXA .