https://kotlinlang.org logo
Title
t

tipsy

02/10/2019, 9:18 AM
i heard there was a compiler option to enable SAM conversion, can anyone point me to the docs for that?
n

Nikky

02/10/2019, 9:55 AM
https://youtrackt.jetbrains.com/issue/KT-7770 i think it was in a compiler option that got removed again, not sure why
also this: https://youtrack.jetbrains.com/issue/KT-11129
-XXLanguage:+NewInference
there was a option before something like
SAMForKotlin
or so that did get removed again
t

tipsy

02/10/2019, 10:31 AM
thanks @Nikky
that's disappointing
n

Nikky

02/10/2019, 10:31 AM
but as linked in there you can use
-XXLanguage:+NewInference
switch, that one should work
t

tipsy

02/10/2019, 10:38 AM
thanks, i'll read through the thread
d

Dico

02/10/2019, 12:10 PM
-XXLanguage:+EnableSAMConversions
I think?
t

tipsy

02/10/2019, 1:13 PM
-XXLanguage:+NewInference
according to the issue
gonna try it out now, just have to figure out how that fits into the maven plugin
t

tipsy

02/10/2019, 1:18 PM
looks like it, yeah
Warning:Kotlin: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+NewInference
-XXLanguage:+NewInference
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
😬
living on the edge
d

Dico

02/10/2019, 1:26 PM
Nothing to worry about imo
t

tipsy

02/10/2019, 1:27 PM
it does seem to work
🎉 3