82255d5ee8
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
249 lines
8.6 KiB
Kotlin
Vendored
249 lines
8.6 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: A
|
|
// Public signature: /A|null[0]
|
|
abstract class A : Java1, Java2 {
|
|
// CHECK:
|
|
// Mangled name: A#<init>(){}
|
|
// Public signature: /A.<init>|-5645683436151566731[0]
|
|
// Public signature debug description: <init>(){}
|
|
constructor() /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#getA(){}kotlin.Int
|
|
// Public signature: /A.getA|5691569834379572517[0]
|
|
// Public signature debug description: getA(){}kotlin.Int
|
|
/* fake */ override fun getA(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#isB(){}kotlin.Boolean
|
|
// Public signature: /A.isB|-4094540604250872999[0]
|
|
// Public signature debug description: isB(){}kotlin.Boolean
|
|
/* fake */ override fun isB(): Boolean
|
|
|
|
// CHECK:
|
|
// Mangled name: A#setA(kotlin.Any?){}
|
|
// Public signature: /A.setA|7506159281020937153[0]
|
|
// Public signature debug description: setA(kotlin.Any?){}
|
|
abstract /* fake */ override fun setA(t: Any?): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: A#setA(kotlin.Int){}
|
|
// Public signature: /A.setA|-2839184409429581850[0]
|
|
// Public signature debug description: setA(kotlin.Int){}
|
|
/* fake */ override fun setA(t: Int): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: A#setB(kotlin.Boolean){}
|
|
// Public signature: /A.setB|2046027712198185521[0]
|
|
// Public signature debug description: setB(kotlin.Boolean){}
|
|
/* fake */ override fun setB(t: Boolean): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: B
|
|
// Public signature: /B|null[0]
|
|
class B : Java1, Java2 {
|
|
// CHECK:
|
|
// Mangled name: B#<init>(){}
|
|
// Public signature: /B.<init>|-5645683436151566731[0]
|
|
// Public signature debug description: <init>(){}
|
|
constructor() /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#getA(){}kotlin.Int
|
|
// Public signature: /B.getA|5691569834379572517[0]
|
|
// Public signature debug description: getA(){}kotlin.Int
|
|
/* fake */ override fun getA(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#isB(){}kotlin.Boolean
|
|
// Public signature: /B.isB|-4094540604250872999[0]
|
|
// Public signature debug description: isB(){}kotlin.Boolean
|
|
/* fake */ override fun isB(): Boolean
|
|
|
|
// CHECK:
|
|
// Mangled name: B#setA(kotlin.Int){}
|
|
// Public signature: /B.setA|-2839184409429581850[0]
|
|
// Public signature debug description: setA(kotlin.Int){}
|
|
/* fake */ override fun setA(t: Int): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: B#setB(kotlin.Boolean){}
|
|
// Public signature: /B.setB|2046027712198185521[0]
|
|
// Public signature debug description: setB(kotlin.Boolean){}
|
|
/* fake */ override fun setB(t: Boolean): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: B#setA(kotlin.Any?){}
|
|
// Public signature: /B.setA|7506159281020937153[0]
|
|
// Public signature debug description: setA(kotlin.Any?){}
|
|
override fun setA(t: Any?): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: C
|
|
// Public signature: /C|null[0]
|
|
abstract class C : Java1, KotlinInterface {
|
|
// CHECK:
|
|
// Mangled name: C#<init>(){}
|
|
// Public signature: /C.<init>|-5645683436151566731[0]
|
|
// Public signature debug description: <init>(){}
|
|
constructor() /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#getA(){}kotlin.Int
|
|
// Public signature: /C.getA|5691569834379572517[0]
|
|
// Public signature debug description: getA(){}kotlin.Int
|
|
/* fake */ override fun getA(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#isB(){}kotlin.Boolean
|
|
// Public signature: /C.isB|-4094540604250872999[0]
|
|
// Public signature debug description: isB(){}kotlin.Boolean
|
|
/* fake */ override fun isB(): Boolean
|
|
|
|
// CHECK:
|
|
// Mangled name: C#setA(kotlin.Int){}
|
|
// Public signature: /C.setA|-2839184409429581850[0]
|
|
// Public signature debug description: setA(kotlin.Int){}
|
|
/* fake */ override fun setA(t: Int): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: C#setB(kotlin.Boolean){}
|
|
// Public signature: /C.setB|2046027712198185521[0]
|
|
// Public signature debug description: setB(kotlin.Boolean){}
|
|
/* fake */ override fun setB(t: Boolean): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: C{}a
|
|
// Public signature: /C.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
abstract /* fake */ override var a: Any
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#<get-a>(){}kotlin.Any
|
|
// Public signature: /C.a.<get-a>|2674885770872562036[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Any
|
|
abstract /* fake */ override get(): Any
|
|
// CHECK:
|
|
// Mangled name: C#<set-a>(kotlin.Any){}
|
|
// Public signature: /C.a.<set-a>|-6749232401949477374[0]
|
|
// Public signature debug description: <set-a>(kotlin.Any){}
|
|
abstract /* fake */ override set(<set-?>: Any): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: C{}b
|
|
// Public signature: /C.b|772347207915745207[0]
|
|
// Public signature debug description: {}b
|
|
abstract /* fake */ override val b: Boolean
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#<get-b>(){}kotlin.Boolean
|
|
// Public signature: /C.b.<get-b>|-7029388108626198383[0]
|
|
// Public signature debug description: <get-b>(){}kotlin.Boolean
|
|
abstract /* fake */ override get(): Boolean
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: D
|
|
// Public signature: /D|null[0]
|
|
class D : Java1, KotlinInterface {
|
|
// CHECK:
|
|
// Mangled name: D{}a
|
|
// Public signature: /D.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
override var a: Any
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#<get-a>(){}kotlin.Any
|
|
// Public signature: /D.a.<get-a>|2674885770872562036[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Any
|
|
override get
|
|
// CHECK:
|
|
// Mangled name: D#<set-a>(kotlin.Any){}
|
|
// Public signature: /D.a.<set-a>|-6749232401949477374[0]
|
|
// Public signature debug description: <set-a>(kotlin.Any){}
|
|
override set
|
|
|
|
// CHECK:
|
|
// Mangled name: D{}b
|
|
// Public signature: /D.b|772347207915745207[0]
|
|
// Public signature debug description: {}b
|
|
override val b: Boolean
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#<get-b>(){}kotlin.Boolean
|
|
// Public signature: /D.b.<get-b>|-7029388108626198383[0]
|
|
// Public signature debug description: <get-b>(){}kotlin.Boolean
|
|
override get
|
|
|
|
// CHECK:
|
|
// Mangled name: D#<init>(kotlin.Any;kotlin.Boolean){}
|
|
// Public signature: /D.<init>|-7656408981943394774[0]
|
|
// Public signature debug description: <init>(kotlin.Any;kotlin.Boolean){}
|
|
constructor(a: Any, b: Boolean) /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#getA(){}kotlin.Int
|
|
// Public signature: /D.getA|5691569834379572517[0]
|
|
// Public signature debug description: getA(){}kotlin.Int
|
|
/* fake */ override fun getA(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#isB(){}kotlin.Boolean
|
|
// Public signature: /D.isB|-4094540604250872999[0]
|
|
// Public signature debug description: isB(){}kotlin.Boolean
|
|
/* fake */ override fun isB(): Boolean
|
|
|
|
// CHECK:
|
|
// Mangled name: D#setA(kotlin.Int){}
|
|
// Public signature: /D.setA|-2839184409429581850[0]
|
|
// Public signature debug description: setA(kotlin.Int){}
|
|
/* fake */ override fun setA(t: Int): Unit
|
|
|
|
// CHECK:
|
|
// Mangled name: D#setB(kotlin.Boolean){}
|
|
// Public signature: /D.setB|2046027712198185521[0]
|
|
// Public signature debug description: setB(kotlin.Boolean){}
|
|
/* fake */ override fun setB(t: Boolean): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface
|
|
// Public signature: /KotlinInterface|null[0]
|
|
interface KotlinInterface {
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface{}a
|
|
// Public signature: /KotlinInterface.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
abstract var a: Any
|
|
// CHECK JVM_IR:
|
|
// Mangled name: KotlinInterface#<get-a>(){}kotlin.Any
|
|
// Public signature: /KotlinInterface.a.<get-a>|2674885770872562036[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Any
|
|
abstract get
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface#<set-a>(kotlin.Any){}
|
|
// Public signature: /KotlinInterface.a.<set-a>|-6749232401949477374[0]
|
|
// Public signature debug description: <set-a>(kotlin.Any){}
|
|
abstract set
|
|
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface{}b
|
|
// Public signature: /KotlinInterface.b|772347207915745207[0]
|
|
// Public signature debug description: {}b
|
|
abstract val b: Boolean
|
|
// CHECK JVM_IR:
|
|
// Mangled name: KotlinInterface#<get-b>(){}kotlin.Boolean
|
|
// Public signature: /KotlinInterface.b.<get-b>|-7029388108626198383[0]
|
|
// Public signature debug description: <get-b>(){}kotlin.Boolean
|
|
abstract get
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: #test(A;B;C;D){}
|
|
// Public signature: /test|7656439746344069424[0]
|
|
// Public signature debug description: test(A;B;C;D){}
|
|
fun test(a: A, b: B, c: C, d: D): Unit
|