FIR: introduce CatchParameterChecker
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d8549d6292
commit
5c0231b727
@@ -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<!>) {}
|
||||
}
|
||||
Reference in New Issue
Block a user