Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.fir.kt
T
2020-03-27 16:46:59 +03:00

11 lines
238 B
Kotlin
Vendored

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