FIR: introduce CatchParameterChecker

This commit is contained in:
eugenpolytechnic
2021-01-29 23:57:19 +03:00
committed by Mikhail Glukhikh
parent d8549d6292
commit 5c0231b727
16 changed files with 123 additions and 10 deletions
@@ -0,0 +1,20 @@
FILE: catchParameter.kt
public final fun <T> test(): R|kotlin/Unit| {
try {
}
catch (e: R|kotlin/NullPointerException| = R|java/lang/NullPointerException.NullPointerException|()) {
}
try {
}
catch (e: R|T|) {
}
}
public final inline fun <reified T> anotherTest(): R|kotlin/Unit| {
try {
}
catch (e: R|T|) {
}
}
@@ -0,0 +1,13 @@
fun <T> test() {
try {
} catch (<!CATCH_PARAMETER_WITH_DEFAULT_VALUE!>e: NullPointerException = NullPointerException()<!>) {
}
try {} catch (<!TYPE_PARAMETER_IN_CATCH_CLAUSE!>e: T<!>) {}
}
inline fun <reified T> anotherTest() {
try {} catch (<!REIFIED_TYPE_IN_CATCH_CLAUSE!>e: T<!>) {}
}