Files
kotlin-fork/idea/testData/inspectionsLocal/liftOut/whenToAssignment/insideLoop.kt
T
2017-07-07 18:15:17 +03:00

15 lines
293 B
Kotlin
Vendored

// HIGHLIGHT: INFORMATION
fun foo(): Int {
var res = 0
loop@ while (true) {
<caret>when (1) {
1 -> res += 1
2 -> throw Exception()
3 -> break@loop
4 -> continue@loop
else -> return -1
}
}
return res
}