[Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
30aae741a6
commit
82255d5ee8
Vendored
+209
@@ -0,0 +1,209 @@
|
||||
// CHECK:
|
||||
// Mangled name: A
|
||||
// Public signature: /A|null[0]
|
||||
open class A {
|
||||
// CHECK:
|
||||
// Mangled name: A#<init>(){}
|
||||
// Public signature: /A.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#get(kotlin.Int?){}kotlin.Int
|
||||
// Public signature: /A.get|6449384512088502848[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int
|
||||
open operator fun get(i: Int?): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: A#invoke(){}
|
||||
// Public signature: /A.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
open operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: A#plus(kotlin.Int?){}A
|
||||
// Public signature: /A.plus|-1795499796367270285[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}A
|
||||
open operator fun plus(i: Int?): A
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: B
|
||||
// Public signature: /B|null[0]
|
||||
class B : Java1 {
|
||||
// CHECK:
|
||||
// Mangled name: B#<init>(){}
|
||||
// Public signature: /B.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: B#get(kotlin.Int?){}kotlin.Int
|
||||
// Public signature: /B.get|6449384512088502848[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int
|
||||
/* fake */ override operator fun get(i: Int?): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: B#invoke(){}
|
||||
// Public signature: /B.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
/* fake */ override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: B#plus(kotlin.Int?){}A
|
||||
// Public signature: /B.plus|-1795499796367270285[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}A
|
||||
/* fake */ override operator fun plus(i: Int?): A
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C
|
||||
// Public signature: /C|null[0]
|
||||
class C : Java2 {
|
||||
// CHECK:
|
||||
// Mangled name: C#<init>(){}
|
||||
// Public signature: /C.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#get(kotlin.Int?){}kotlin.Int
|
||||
// Public signature: /C.get|6449384512088502848[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int
|
||||
/* fake */ override operator fun get(i: Int?): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: C#invoke(){}
|
||||
// Public signature: /C.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
/* fake */ override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: C#plus(kotlin.Int?){}A
|
||||
// Public signature: /C.plus|-1795499796367270285[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}A
|
||||
/* fake */ override operator fun plus(i: Int?): A
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: D
|
||||
// Public signature: /D|null[0]
|
||||
class D : Java1 {
|
||||
// CHECK:
|
||||
// Mangled name: D#<init>(){}
|
||||
// Public signature: /D.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: D#get(kotlin.Int?){}kotlin.Int
|
||||
// Public signature: /D.get|6449384512088502848[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int
|
||||
override operator fun get(i: Int?): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: D#invoke(){}
|
||||
// Public signature: /D.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: D#plus(kotlin.Int?){}A
|
||||
// Public signature: /D.plus|-1795499796367270285[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}A
|
||||
override operator fun plus(i: Int?): A
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: E
|
||||
// Public signature: /E|null[0]
|
||||
abstract class E : Java4 {
|
||||
// CHECK:
|
||||
// Mangled name: E#<init>(){}
|
||||
// Public signature: /E.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: E#get(kotlin.Int?){}kotlin.Int?
|
||||
// Public signature: /E.get|7040689195092882450[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int?
|
||||
abstract /* fake */ override operator fun get(i: Int?): Int?
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: E#invoke(){}
|
||||
// Public signature: /E.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
abstract /* fake */ override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: E#plus(kotlin.Int?){}Java3?
|
||||
// Public signature: /E.plus|-4867345056319774975[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}Java3?
|
||||
abstract /* fake */ override operator fun plus(i: Int?): Java3?
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: F
|
||||
// Public signature: /F|null[0]
|
||||
class F : Java4 {
|
||||
// CHECK:
|
||||
// Mangled name: F#<init>(){}
|
||||
// Public signature: /F.<init>|-5645683436151566731[0]
|
||||
// Public signature debug description: <init>(){}
|
||||
constructor() /* primary */
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: F#get(kotlin.Int?){}kotlin.Int
|
||||
// Public signature: /F.get|6449384512088502848[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int
|
||||
override operator fun get(i: Int?): Int
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: F#invoke(){}
|
||||
// Public signature: /F.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: F#plus(kotlin.Int?){}Java3
|
||||
// Public signature: /F.plus|-1134082592939971042[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}Java3
|
||||
override operator fun plus(i: Int?): Java3
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: KotlinInterface
|
||||
// Public signature: /KotlinInterface|null[0]
|
||||
interface KotlinInterface : Java3 {
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: KotlinInterface#get(kotlin.Int?){}kotlin.Int?
|
||||
// Public signature: /KotlinInterface.get|7040689195092882450[0]
|
||||
// Public signature debug description: get(kotlin.Int?){}kotlin.Int?
|
||||
abstract /* fake */ override operator fun get(i: Int?): Int?
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: KotlinInterface#invoke(){}
|
||||
// Public signature: /KotlinInterface.invoke|-4663091332620260873[0]
|
||||
// Public signature debug description: invoke(){}
|
||||
abstract /* fake */ override operator fun invoke(): Unit
|
||||
|
||||
// CHECK JVM_IR:
|
||||
// Mangled name: KotlinInterface#plus(kotlin.Int?){}Java3?
|
||||
// Public signature: /KotlinInterface.plus|-4867345056319774975[0]
|
||||
// Public signature debug description: plus(kotlin.Int?){}Java3?
|
||||
abstract /* fake */ override operator fun plus(i: Int?): Java3?
|
||||
|
||||
}
|
||||
|
||||
// CHECK:
|
||||
// Mangled name: #test(B;C;D;E;F){}
|
||||
// Public signature: /test|-7946478318145452671[0]
|
||||
// Public signature debug description: test(B;C;D;E;F){}
|
||||
fun test(b: B, c: C, d: D, e: E, f: F): Unit
|
||||
Reference in New Issue
Block a user