Wrong diagnostic when last expression in lambda contains assignment operation

#KT-6769 Fixed
This commit is contained in:
Stanislav Erokhin
2015-02-26 22:50:55 +03:00
parent 09435ad0e3
commit 602689892e
8 changed files with 76 additions and 1 deletions
@@ -0,0 +1,11 @@
fun main(args : Array<String>) {
var list = listOf(1)
val a: Int? = 2
a?.let { list += it }
}
fun <T : Any, R> T.let(f: (T) -> R): R = f(this)
fun <T> Iterable<T>.plus(<!UNUSED_PARAMETER!>element<!>: T): List<T> = null!!
fun listOf<T>(vararg <!UNUSED_PARAMETER!>values<!>: T): List<T> = null!!