Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
T
2024-02-20 17:34:49 +00:00

12 lines
233 B
Kotlin
Vendored

// FIR_IDENTICAL
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