FIR: introduce ThrowableSubclassChecker

This commit is contained in:
eugenpolytechnic
2021-02-02 14:38:17 +03:00
committed by Mikhail Glukhikh
parent cd189c0812
commit a564f92eef
22 changed files with 209 additions and 90 deletions
@@ -2,11 +2,11 @@
// See KT-9816, KT-9742
// Not allowed in Java
class ZException<T>(val p: T) : Exception()
class ZException<<!GENERIC_THROWABLE_SUBCLASS!>T<!>>(val p: T) : Exception()
class YException<T>(val p: T): java.lang.RuntimeException()
class YException<<!GENERIC_THROWABLE_SUBCLASS!>T<!>>(val p: T): java.lang.RuntimeException()
class XException<T>(val p: T): Throwable()
class XException<<!GENERIC_THROWABLE_SUBCLASS!>T<!>>(val p: T): Throwable()
fun bar() {
try {