[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
This commit is contained in:
committed by
Space Team
parent
bcdd85758e
commit
86836e69e9
+54
-14
@@ -1,25 +1,65 @@
|
||||
// CHECK:
|
||||
// Mangled name: Test
|
||||
// Public signature: /Test|null[0]
|
||||
class Test<T : Any?> : J<T> {
|
||||
// Mangled name: Inv
|
||||
// Public signature: /Inv|null[0]
|
||||
class Inv<T : Any?> {
|
||||
// CHECK:
|
||||
// Mangled name: Test{}x
|
||||
// Public signature: /Test.x|-8060530855978347579[0]
|
||||
// Mangled name: Inv{}x
|
||||
// Public signature: /Inv.x|-8060530855978347579[0]
|
||||
val x: T
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: Test#<get-x>(){}1:0
|
||||
// Public signature: /Test.x.<get-x>|-8893883356128097563[0]
|
||||
// Mangled name: Inv#<get-x>(){}1:0
|
||||
// Public signature: /Inv.x.<get-x>|-8893883356128097563[0]
|
||||
get
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Test#<init>(1:0){}
|
||||
// Public signature: /Test.<init>|-8731461708390519279[0]
|
||||
// Mangled name: Inv#<init>(1:0){}
|
||||
// Public signature: /Inv.<init>|-8731461708390519279[0]
|
||||
constructor(x: T) /* primary */
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: Test#test(J.B<1:0>){}
|
||||
// Public signature: /Test.test|7386642793853999047[0]
|
||||
fun test(b: B<T>): Unit
|
||||
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user