Test for KT-2082 Missing 'Unused expression' warning

#KT-2082 obsolete
This commit is contained in:
Evgeny Gerashchenko
2015-07-09 22:13:00 +03:00
parent 1cf433909b
commit 50dbf080f7
3 changed files with 21 additions and 0 deletions
@@ -0,0 +1,10 @@
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
@@ -0,0 +1,5 @@
package
internal fun bar(): kotlin.String?
internal fun foo(/*0*/ c: kotlin.Collection<kotlin.String>): () -> kotlin.List<kotlin.String>
internal fun zoo(/*0*/ s: kotlin.String): kotlin.Boolean