Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt6153.kt
T
2019-11-19 11:00:09 +03:00

17 lines
395 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// KT-6153 java.lang.IllegalStateException while building
object Bug {
fun title(id:Int) = when (id) {
0 -> "OK"
else -> throw Exception("unsupported $id")
}
private fun <T> T.header(id: Int) = StringBuilder().append(title(id))
fun run() = header(0)
}
fun box(): String {
return Bug.run().toString()
}