Files
kotlin/compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt
dnpetrov c24e6b5698 Support 'break' and 'continue' in expressions
- generate fake jump instructions so that we can always analyze stack depths
- fix stack before break and continue by dropping excessive elements (e.g., *a*.foo(*b*, c?:continue))
- Analyzer rewritten in Kotlin, with more flexible control of CFG traversal

 #Fixed KT-3340
 #Fixed KT-4258
 #Fixed KT-7941
2015-06-25 17:40:55 +03:00

14 lines
247 B
Kotlin
Vendored

fun foo(x: Long, y: Int, z: Double, s: String) {}
fun box(): String {
while (true) {
try {
foo(0, 0, 0.0, "" + continue)
}
finally {
foo(0, 0, 0.0, "" + break)
}
}
return "OK"
}