andylamax
12/22/2020, 1:46 AMMarc Knaup
12/22/2020, 9:51 AMandylamax
12/22/2020, 6:16 PMfun RBuilder.Hello(onClick:(()->Unit)? = null) {
// . . .
}
When I use it like this, I get this error
Hello(
onClick = { doSomething() }.takeIf { someconditionIsMet() }
)
Marc Knaup
12/22/2020, 6:23 PMdoSomething()
?andylamax
12/22/2020, 6:24 PMfun doSomething() : Unit
Marc Knaup
12/22/2020, 6:36 PMMarc Knaup
12/22/2020, 6:36 PMHello
?
Or maybe there’s a type inference problem?