[FIR] Implement bare type modification with known type arguments

This commit is contained in:
Mikhail Glukhikh
2020-02-10 10:56:59 +03:00
parent 28332933ce
commit e3721ed406
14 changed files with 79 additions and 24 deletions
@@ -1,7 +1,7 @@
// !WITH_NEW_INFERENCE
fun <A, B> Either<A, B>.recover(f: (A) -> B): Either<A, B> = when (this) {
is Either.Left -> <!INAPPLICABLE_CANDIDATE!>f<!>(this.a).<!INAPPLICABLE_CANDIDATE!>right<!>()
is Either.Left -> f(this.a).right()
is Either.Right -> this
}