[FIR] Add checker for finite bounds validation

Added a new FIR based checker for both FINITE_BOUNDS_VIOLATION and
FINITE_BOUNDS_VIOLATION_IN_JAVA errors. Implementation copied from the
existing descriptor based checker with some minor changes.

#KT-59378 Fixed
This commit is contained in:
Brian Norman
2023-08-04 14:06:14 -05:00
committed by Space Team
parent 6a886e4c32
commit e8b4550173
17 changed files with 164 additions and 36 deletions
@@ -7,7 +7,7 @@ class A<T : Inv<in T>> {
fun foo(): T = null!!
}
class Inv2<T : Inv2<in T>>(val x: T)
class Inv2<<!FINITE_BOUNDS_VIOLATION!>T : Inv2<in T><!>>(val x: T)
fun main(a: A<*>, j: JavaClass<*>, i2: Inv2<*>) {
// Probably it's too restrictive to suppose star projection type here as Any?,