Files
kotlin-fork/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunUnusedLastExpressionInBlock.kt
T
2016-03-23 20:08:15 +03:00

22 lines
303 B
Kotlin
Vendored

fun unusedExpressions() {
if (1 == 1)
fun(): Int {return 1}
else
fun() = 1
if (1 == 1) {
fun(): Int {
return 1
}
}
else
fun() = 1
when (1) {
0 -> fun(): Int {return 1}
else -> fun() = 1
}
fun() = 1
}