Files
kotlin/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt
2014-11-21 14:02:41 +03:00

15 lines
262 B
Kotlin

// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_EXPRESSION
import java.util.HashSet
fun test123() {
val g: (Int) -> Unit = if (true) {
val set = HashSet<Int>();
{ i ->
set.add(i)
}
}
else {
{ it -> it }
}
}