Files
kotlin-fork/compiler/testData/diagnostics/tests/labels/kt361.kt
T
2015-04-29 14:03:11 +03:00

11 lines
297 B
Kotlin
Vendored

fun nonlocals(b : Boolean) {
a@<!UNUSED_FUNCTION_LITERAL!>{
fun foo() {
if (b) {
<!RETURN_NOT_ALLOWED!>return@a 1<!> // The label must be resolved, but an error should be reported for a non-local return
}
}
return@a 5
}<!>
}