Add a test for KT-54318

This commit is contained in:
Pavel Mikhailovskii
2022-10-10 13:47:34 +02:00
parent 5fdfd4a421
commit 0947834f0d
3 changed files with 31 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// TARGET_BACKEND: JVM_IR
fun f(b: Int): Long? {
return try {
null
} catch (e: Throwable) {
if (b == 0)
throw e
else {
null
}
}
}
fun box(): String {
f(0)
f(1)
return "OK"
}