veiset
01/03/2019, 11:36 AMbinding { }
function. Can anyone help me out and explain why it can't infer the type in this case:
fun Either<String, String>.stringify(): String = this.fold({ it }, { "error" })
fun <T> getResult(t: T): Either<String, T> = Right(t)
fun doSomething(): String =
binding {
getResult("hello").bind()
}.stringify()
Is there any way to make it infer the type when using an extension function on the result of a binding
?