Skip to content

Conversation

@Jolanrensen
Copy link
Collaborator

This continues the work from #72 and provides easy to use wrappers for Kotlin to convert between Scala and Kotlin collections.

I noticed that the conversions cannot be put in the common folder due to the Scala conversion functions being absent there, so I added the conversions to both 2.4 and 3.0 including some tests.

I also changed the naming, which can be discussed, to be more consistent:

fun <A, B> ScalaMap<A, B>.asKotlinMap(): Map<A, B>

and

fun <A, B> Map<A, B>.asScalaMap(): ScalaMap<A, B>

FelixEngl and others added 7 commits October 9, 2020 12:50
….0, fixed aligning and added explicit types to all calls (prevents complaining by some scala functions)
…enamed conversions to kotlin to include "asKotlin" (can be discussed)
…enamed conversions to kotlin to include "asKotlin" (can be discussed)
@asm0dey
Copy link
Contributor

asm0dey commented Apr 26, 2021

Awesome contribution, thank you! Is it finished?

@asm0dey
Copy link
Contributor

asm0dey commented Apr 26, 2021

BTW it looks like it could be moved to the common module

@Jolanrensen
Copy link
Collaborator Author

BTW it looks like it could be moved to the common module

For me, moving it into the common module didn't work, since that module doesn't have access to the Scala library with the conversions. You can try it yourself if you like, because it would definitely be better.
But other than that, it's finished for now :)

@asm0dey
Copy link
Contributor

asm0dey commented Apr 26, 2021

Oh, agreed!

Could you please fix conflicts than for me to be able to merge the PR?

@asm0dey asm0dey merged commit 5976136 into Kotlin:master Apr 26, 2021
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

Successfully merging this pull request may close these issues.

3 participants