Files
Kirill Rakhman 251827c9aa [FIR] Don't approximate captured types
This fixes some type argument mismatch errors caused by a captured type
being approximated and then captured again.
Some places need to be adapted to work with captured types that
previously only worked with approximated types.

#KT-62959 Fixed
2024-01-17 08:20:05 +00:00

13 lines
363 B
Kotlin
Vendored

// ISSUE: KT-40131
import kotlin.reflect.KClass
val <U> KClass<U>.javaImpl: Class<U>
get() = null!!
val <T : KClass<*>> T.myJava1: Class<*>
get() = <!DEBUG_INFO_EXPRESSION_TYPE("java.lang.Class<CapturedType(*)>")!>javaImpl<!>
val <E : Any, T : KClass<E>> T.myJava2: Class<E>
get() = <!DEBUG_INFO_EXPRESSION_TYPE("java.lang.Class<E>")!>javaImpl<!>