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

15 lines
269 B
Kotlin
Vendored

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