Files
kotlin-fork/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt
T
Dmitry Petrov 11caa03427 KT-16713 Insufficient maximum stack size
1. Analyze method node with fake jumps for loops to make sure that
all instructions reachable only through break/continue jumps are processed.
2. Fix stack for break/continue jumps.
3. Drop fake jumps for loops, analyze method node again.
4. Fix stack for try/catch and beforeInline.
2017-03-08 09:56:08 +01:00

32 lines
474 B
Kotlin
Vendored

class MyQueue {
fun poll(): String? = null
}
class A {
val delayedQueue = MyQueue()
var cond = true
fun next() {
while (cond) {
delayedQueue.poll() ?: break
}
while (cond) {
unblock(delayedQueue.poll() ?: break)
}
while (cond) {
unblock(delayedQueue.poll() ?: break)
}
}
fun unblock(p: String) {
}
}
fun box() : String {
A().next()
return "OK"
}