FIR: introduce parameter type is Throwable check

This commit is contained in:
eugenpolytechnic
2021-01-31 17:37:11 +03:00
committed by Mikhail Glukhikh
parent 5c0231b727
commit 9ad88a5a0d
5 changed files with 67 additions and 16 deletions
@@ -1,5 +1,6 @@
FILE: catchParameter.kt
public final fun <T> test(): R|kotlin/Unit| {
public final typealias StringType = R|kotlin/String|
public final fun <T : R|kotlin/Throwable|> test(): R|kotlin/Unit| {
try {
}
catch (e: R|kotlin/NullPointerException| = R|java/lang/NullPointerException.NullPointerException|()) {
@@ -10,6 +11,26 @@ FILE: catchParameter.kt
catch (e: R|T|) {
}
try {
}
catch (e: R|() -> kotlin/Int|) {
}
try {
}
catch (e: R|StringType|) {
}
try {
}
catch (e: R|kotlin/Int| = Int(5)) {
}
try {
}
catch (e: R|kotlin/Throwable|) {
}
}
public final inline fun <reified T> anotherTest(): R|kotlin/Unit| {
try {
@@ -17,4 +38,4 @@ FILE: catchParameter.kt
catch (e: R|T|) {
}
}
}