raulraja
03/06/2019, 2:27 PMimport arrow.core.Some
import arrow.core.None
val remoteInput = Some("blue")
.flatMap { if(it.isNullOrBlank()) None else Some(it.trim()) }
.map { it.toLowerCase() }
val vi = remoteInput.toEither { Exception("No valid input") }
fun main(args: Array<String>) {
println(remoteInput)
println(vi)
}
This is most likely a JDK bug or Kotlin compiler bug in codegen. Do you have a full example including imports?