Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAM Issue Resolved with Upcoming Type Inference Overhaul #197

Open
thomasnield opened this issue Oct 6, 2018 · 7 comments
Open

SAM Issue Resolved with Upcoming Type Inference Overhaul #197

thomasnield opened this issue Oct 6, 2018 · 7 comments

Comments

@thomasnield
Copy link
Collaborator

thomasnield commented Oct 6, 2018

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.

@thomasnield thomasnield changed the title New Type Inference System SAM Issue Resolved with Upcoming Type Inference Overhaul Oct 6, 2018
@stepango
Copy link
Collaborator

stepango commented Oct 7, 2018

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
Copy link
Collaborator Author

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

@thomasnield
Copy link
Collaborator Author

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
Copy link

bubenheimer commented Aug 20, 2020

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
Copy link
Collaborator

vpriscan commented Aug 20, 2020

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

@vpriscan
Copy link
Collaborator

#238 deprecates SAM helper functions

@victorMontero
Copy link

victorMontero commented Aug 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants