Files
kotlin-fork/compiler/testData/codegen/box/regressions/kt6153.kt
T
2014-11-17 17:38:52 +03:00

15 lines
340 B
Kotlin
Vendored

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