i heard there was a compiler option to enable SAM ...
# announcements
t
i heard there was a compiler option to enable SAM conversion, can anyone point me to the docs for that?
n
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
thanks @Nikky
that's disappointing
n
but as linked in there you can use
-XXLanguage:+NewInference
switch, that one should work
t
thanks, i'll read through the thread
d
-XXLanguage:+EnableSAMConversions
I think?
t
-XXLanguage:+NewInference
according to the issue
gonna try it out now, just have to figure out how that fits into the maven plugin
t
looks like it, yeah
Copy code
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
Nothing to worry about imo
t
it does seem to work
🎉 3