I am getting error: The feature "unit conversion" ...
# announcements
a
I am getting error: The feature "unit conversion" is disabled. What does this mean? and how do I enable it? IDEA suggested to set languageVersion to "1.4", I am still getting the error though
m
What is the code? It has something to do with the return type of lambas as far as I remember. Typically it's a programming issue.
a
I am trying to return an nullable lambda I have a function
Copy code
fun RBuilder.Hello(onClick:(()->Unit)? = null) {
   // . . .
}
When I use it like this, I get this error
Copy code
Hello(
    onClick = { doSomething() }.takeIf { someconditionIsMet() }
)
m
What’s the signature of
doSomething()
?
a
fun doSomething() : Unit
m
Weird. The sample code works perfectly fine for me with 1.3 and 1.4. And with JVM and JS target 🤔
Are there any overloads to
Hello
? Or maybe there’s a type inference problem?