Don't fix type variables into Nothing in priority way

^KT-44546 Fixed
This commit is contained in:
Victor Petukhov
2021-02-11 17:30:13 +03:00
parent 440fc8c4e4
commit dcad9c84fc
2 changed files with 9 additions and 8 deletions
@@ -10,5 +10,5 @@ fun <R : Some> Some.doWithPredicate(predicate: (R) -> Unit): R? = TODO()
fun test(derived: Some) {
val expected: Some = derived.doWithPredicate { it.method() } ?: TODO()
val expected2: Some = <!IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION!>elvis<!>(derived.doWithPredicate { it.<!UNRESOLVED_REFERENCE!>method<!>() }, TODO())
val expected2: Some = elvis(derived.doWithPredicate { it.method() }, TODO())
}