Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.kt
T
Evgeny Gerashchenko 50dbf080f7 Test for KT-2082 Missing 'Unused expression' warning
#KT-2082 obsolete
2015-08-15 12:29:41 +02:00

10 lines
274 B
Kotlin
Vendored

fun foo(c : Collection<String>) = {
c.filter{
val s : String? = bar()
if (s == null) <!UNUSED_EXPRESSION!>false<!> // here!
zoo(<!TYPE_MISMATCH!>s<!>)
}
}
fun bar() : String? = null
fun zoo(<!UNUSED_PARAMETER!>s<!> : String) : Boolean = true