Fix FIR test lambdaParameterTypeInElvis

This commit is contained in:
Victor Petukhov
2021-02-15 12:56:05 +03:00
parent 8acf3b1d76
commit c0759f96e9
2 changed files with 14 additions and 1 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 {