Files
kotlin/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
2013-09-30 21:06:05 +04:00

11 lines
239 B
Kotlin
Vendored

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