f cannot generate Ior.Right or Ior.Both since it is only passed a leftValue
Needs to be f: (A, B) -> Ior<D, B>
|
public inline fun <A, B, D> Ior<A, B>.handleErrorWith(combine: (B, B) -> B, f: (A) -> Ior<D, B>): Ior<D, B> { |
|
contract { |
|
callsInPlace(combine, InvocationKind.AT_MOST_ONCE) |
|
callsInPlace(f, InvocationKind.AT_MOST_ONCE) |
|
} |
|
return when (this) { |
|
is Left -> f(value) |
|
is Right -> this |
|
is Both -> when (val l = f(leftValue)) { |
fcannot generateIor.RightorIor.Bothsince it is only passed a leftValueNeeds to be
f: (A, B) -> Ior<D, B>arrow/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Ior.kt
Lines 428 to 436 in 8c27809