FIR: approximate intersections in public position properly

#KT-48166 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-08-18 10:58:25 +03:00
committed by TeamCityServer
parent 7b0e5927cb
commit 19ab0ab2f8
7 changed files with 38 additions and 4 deletions
@@ -0,0 +1,6 @@
FILE: ParentOfType.kt
public final fun <T : R|kotlin/Number|> R|kotlin/Any|.parentOfTypes(vararg classes: R|kotlin/Array<out kotlin/reflect/KClass<out T>>|): R|T?| {
throw R|java/lang/IllegalStateException.IllegalStateException|()
}
public final val some: R|kotlin/Number?| = String(123).R|/parentOfTypes|<R|it(kotlin/Number & kotlin/Comparable<*>)|>(vararg(<getClass>(Q|kotlin/Int|), <getClass>(Q|kotlin/Double|)))
public get(): R|kotlin/Number?|
@@ -0,0 +1,7 @@
import kotlin.reflect.KClass
fun <T : Number> Any.parentOfTypes(vararg classes: KClass<out T>): T? {
throw IllegalStateException()
}
val some = "123".parentOfTypes(Int::class, Double::class)