Files
kotlin-fork/compiler/testData/ir/irText/firProblems/SignatureComputationComplexJavaGeneric.sig.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

66 lines
1.8 KiB
Kotlin
Vendored

// CHECK:
// Mangled name: Inv
// Public signature: /Inv|null[0]
class Inv<T : Any?> {
// CHECK:
// Mangled name: Inv{}x
// Public signature: /Inv.x|-8060530855978347579[0]
val x: T
// CHECK JVM_IR:
// Mangled name: Inv#<get-x>(){}1:0
// Public signature: /Inv.x.<get-x>|-8893883356128097563[0]
get
// CHECK:
// Mangled name: Inv#<init>(1:0){}
// Public signature: /Inv.<init>|-8731461708390519279[0]
constructor(x: T) /* primary */
}
// CHECK:
// Mangled name: Test_1
// Public signature: /Test_1|null[0]
class Test_1<TT : Any?> : JavaClass1<TT> {
// CHECK:
// Mangled name: Test_1{}x
// Public signature: /Test_1.x|-8060530855978347579[0]
val x: TT
// CHECK JVM_IR:
// Mangled name: Test_1#<get-x>(){}1:0
// Public signature: /Test_1.x.<get-x>|-8893883356128097563[0]
get
// CHECK:
// Mangled name: Test_1#<init>(1:0){}
// Public signature: /Test_1.<init>|-8731461708390519279[0]
constructor(x: TT) /* primary */
// CHECK:
// Mangled name: Test_1#test(JavaClass1.B<1:0>){}
// Public signature: /Test_1.test|-4347685660863074857[0]
fun test(b: B<TT>): Unit
}
// CHECK:
// Mangled name: Test_2
// Public signature: /Test_2|null[0]
class Test_2<TT : Any?> : JavaClass2<TT, Inv<TT>> {
// CHECK:
// Mangled name: Test_2#<init>(){}
// Public signature: /Test_2.<init>|-5645683436151566731[0]
constructor() /* primary */
// CHECK:
// Mangled name: Test_2#process(JavaClass2.B<1:0,Inv<1:0>>){}
// Public signature: /Test_2.process|4196267472785317094[0]
fun process(b: B<TT, Inv<TT>>): Unit
}
// CHECK:
// Mangled name: #test_3(JavaClass1.B<0:0>;0:0){0§<kotlin.Any?>}
// Public signature: /test_3|8017402258673595148[0]
fun <R : Any?> test_3(jb: B<R>, r: R): Unit