afacff326d
#KT-48163 Fixed
20 lines
302 B
Kotlin
Vendored
20 lines
302 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
import java.io.Serializable
|
|
|
|
fun bar(s: Serializable) {
|
|
when (s) {
|
|
is Exception -> throw s
|
|
else -> Unit
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
try {
|
|
bar(Exception("OK"))
|
|
return "Fail"
|
|
} catch (e: Exception) {
|
|
return e.message!!
|
|
}
|
|
}
|