Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt
T
2017-11-29 02:53:49 +03:00

16 lines
285 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !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 }
}
}