Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt6153.kt
T

16 lines
365 B
Kotlin
Vendored

// 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()
}