Files
kotlin/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt

15 lines
262 B
Kotlin
Vendored

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