[TD] Update testdata according to KT-44546

This commit is contained in:
Dmitriy Novozhilov
2021-01-26 17:05:43 +03:00
parent 299272fa6d
commit f3364ec602
2 changed files with 15 additions and 2 deletions
@@ -0,0 +1,14 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNREACHABLE_CODE
interface Some {
fun method(): Unit
}
fun <S> elvis(nullable: S?, notNullable: S): S = TODO()
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 = elvis(derived.doWithPredicate { it.<!UNRESOLVED_REFERENCE!>method<!>() }, TODO())
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNREACHABLE_CODE
interface Some {
@@ -11,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 = elvis(derived.doWithPredicate { it.method() }, TODO())
val expected2: Some = <!IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION!>elvis<!>(derived.doWithPredicate { it.<!UNRESOLVED_REFERENCE!>method<!>() }, TODO())
}