See the comments in the following Kotlin snippet. ...
# announcements
e
See the comments in the following Kotlin snippet. Why does the build fail when I have
android { kotlinOptions { languageVersion = "1.5" } }
in my module's build.gradle file? Also, I wonder if this feature is documented somewhere (and where, of course).
Copy code
fun a(b: () -> Unit): Unit = TODO()

fun f(): Any? = TODO()
val p = a(::f) // OK

val g: KFunction0<Any?> = ::f
val q = a(g) // Fails: The feature "unit conversion" is disabled

val h: () -> Any? = ::f
val r = a(h) // Fails: The feature "unit conversion" is disabled