Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.fir.kt
T
2021-04-19 15:10:58 +03:00

11 lines
190 B
Kotlin
Vendored

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