blob: 1639def43c60647a2e4dbb16700ec33d39a4ddf1 [file]
// TARGET_BACKEND: JVM
fun box(): String {
42.doSwitchInt()
"".doSwitchString()
return "OK"
}
inline fun <reified E> E.doSwitchInt(): String = when (E::class) {
Int::class -> "success!"
else -> throw AssertionError()
}
inline fun <reified E> E.doSwitchString(): String = when(E::class) {
String::class -> "success!"
else -> throw AssertionError()
}