Files
kotlin-fork/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.kt.txt
T
Kirill Rakhman 86836e69e9 [FIR2IR] Unwrap call-site substitution overrides
Generating IR declarations for use-site substitution overrides leads
to IR that is different from K1 as well as problems in signature
generation which relies on mangling. Use-site substitutions can contain
references to type parameters from the call-site which aren't handled
in mangling.

#KT-57022 Fixed
2023-06-09 08:22:21 +00:00

47 lines
675 B
Kotlin
Vendored

class Inv<T : Any?> {
constructor(x: T) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: T
field = x
get
}
class Test_1<TT : Any?> : JavaClass1<TT> {
constructor(x: TT) /* primary */ {
super/*JavaClass1*/<TT>()
/* <init>() */
}
val x: TT
field = x
get
fun test(b: B<TT>) {
b.output(x = <this>.<get-x>())
}
}
class Test_2<TT : Any?> : JavaClass2<TT, Inv<TT>> {
constructor() /* primary */ {
super/*JavaClass2*/<TT, Inv<TT>>()
/* <init>() */
}
fun process(b: B<TT, Inv<TT>>) {
b.output(output = Inv<TT>(x = b.element()))
}
}
fun <R : Any?> test_3(jb: B<R>, r: R) {
jb.output(x = r)
}