Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
T

11 lines
216 B
Kotlin
Vendored

fun foo1() = <!EXPRESSION_EXPECTED!>while (b()) {}<!>
fun foo2() = <!EXPRESSION_EXPECTED!>for (i in <!ITERATOR_MISSING!>10<!>) {}<!>
fun foo3() = when (b()) {
true -> 1
else -> 0
}
fun b(): Boolean = true