82255d5ee8
Add tests for fake overrides with focus on java interoperability Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
272 lines
9.2 KiB
Kotlin
Vendored
272 lines
9.2 KiB
Kotlin
Vendored
// CHECK:
|
|
// Mangled name: A
|
|
// Public signature: /A|null[0]
|
|
data class A : Java1 {
|
|
// CHECK:
|
|
// Mangled name: A{}a
|
|
// Public signature: /A.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
val a: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#<get-a>(){}kotlin.Int
|
|
// Public signature: /A.a.<get-a>|4232747788241509192[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Int
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: A#<init>(kotlin.Int){}
|
|
// Public signature: /A.<init>|-5182794243525578284[0]
|
|
// Public signature debug description: <init>(kotlin.Int){}
|
|
constructor(a: Int) /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#component1(){}kotlin.Int
|
|
// Public signature: /A.component1|-8217597213800111288[0]
|
|
// Public signature debug description: component1(){}kotlin.Int
|
|
override operator fun component1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#copy(kotlin.Int){}A
|
|
// Public signature: /A.copy|6666966860941076951[0]
|
|
// Public signature debug description: copy(kotlin.Int){}A
|
|
fun copy(a: Int): A
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#equals(kotlin.Any?){}kotlin.Boolean
|
|
// Public signature: /A.equals|722809408929142791[0]
|
|
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
|
|
override operator fun equals(other: Any?): Boolean
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#hashCode(){}kotlin.Int
|
|
// Public signature: /A.hashCode|-8048879360829830756[0]
|
|
// Public signature debug description: hashCode(){}kotlin.Int
|
|
override fun hashCode(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: A#toString(){}kotlin.String
|
|
// Public signature: /A.toString|6958853723545266802[0]
|
|
// Public signature debug description: toString(){}kotlin.String
|
|
override fun toString(): String
|
|
|
|
// CHECK:
|
|
// Mangled name: A#foo(kotlin.Int?){}
|
|
// Public signature: /A.foo|-4109638554625433529[0]
|
|
// Public signature debug description: foo(kotlin.Int?){}
|
|
override fun foo(i: Int?): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: B
|
|
// Public signature: /B|null[0]
|
|
data class B : Java1, Java2 {
|
|
// CHECK:
|
|
// Mangled name: B{}a
|
|
// Public signature: /B.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
val a: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#<get-a>(){}kotlin.Int
|
|
// Public signature: /B.a.<get-a>|4232747788241509192[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Int
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: B#<init>(kotlin.Int){}
|
|
// Public signature: /B.<init>|-5182794243525578284[0]
|
|
// Public signature debug description: <init>(kotlin.Int){}
|
|
constructor(a: Int) /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: B#foo(kotlin.Int?){}
|
|
// Public signature: /B.foo|-4109638554625433529[0]
|
|
// Public signature debug description: foo(kotlin.Int?){}
|
|
/* fake */ override fun foo(i: Int?): Unit
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#component1(){}kotlin.Int
|
|
// Public signature: /B.component1|-8217597213800111288[0]
|
|
// Public signature debug description: component1(){}kotlin.Int
|
|
override operator fun component1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#copy(kotlin.Int){}B
|
|
// Public signature: /B.copy|5674867048974181753[0]
|
|
// Public signature debug description: copy(kotlin.Int){}B
|
|
fun copy(a: Int): B
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#equals(kotlin.Any?){}kotlin.Boolean
|
|
// Public signature: /B.equals|722809408929142791[0]
|
|
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
|
|
override operator fun equals(other: Any?): Boolean
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#hashCode(){}kotlin.Int
|
|
// Public signature: /B.hashCode|-8048879360829830756[0]
|
|
// Public signature debug description: hashCode(){}kotlin.Int
|
|
override fun hashCode(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: B#toString(){}kotlin.String
|
|
// Public signature: /B.toString|6958853723545266802[0]
|
|
// Public signature debug description: toString(){}kotlin.String
|
|
override fun toString(): String
|
|
|
|
// CHECK:
|
|
// Mangled name: B#foo(kotlin.Any?){}
|
|
// Public signature: /B.foo|-6211124056249407422[0]
|
|
// Public signature debug description: foo(kotlin.Any?){}
|
|
override fun foo(i: Any?): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: C
|
|
// Public signature: /C|null[0]
|
|
data class C : Java1, KotlinInterface {
|
|
// CHECK:
|
|
// Mangled name: C{}a
|
|
// Public signature: /C.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
val a: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#<get-a>(){}kotlin.Int
|
|
// Public signature: /C.a.<get-a>|4232747788241509192[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Int
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: C#<init>(kotlin.Int){}
|
|
// Public signature: /C.<init>|-5182794243525578284[0]
|
|
// Public signature debug description: <init>(kotlin.Int){}
|
|
constructor(a: Int) /* primary */
|
|
|
|
// CHECK:
|
|
// Mangled name: C#foo(kotlin.Int?){}
|
|
// Public signature: /C.foo|-4109638554625433529[0]
|
|
// Public signature debug description: foo(kotlin.Int?){}
|
|
/* fake */ override fun foo(i: Int?): Unit
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#component1(){}kotlin.Int
|
|
// Public signature: /C.component1|-8217597213800111288[0]
|
|
// Public signature debug description: component1(){}kotlin.Int
|
|
override operator fun component1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#copy(kotlin.Int){}C
|
|
// Public signature: /C.copy|-9014440408173608316[0]
|
|
// Public signature debug description: copy(kotlin.Int){}C
|
|
fun copy(a: Int): C
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#equals(kotlin.Any?){}kotlin.Boolean
|
|
// Public signature: /C.equals|722809408929142791[0]
|
|
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
|
|
override operator fun equals(other: Any?): Boolean
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#hashCode(){}kotlin.Int
|
|
// Public signature: /C.hashCode|-8048879360829830756[0]
|
|
// Public signature debug description: hashCode(){}kotlin.Int
|
|
override fun hashCode(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: C#toString(){}kotlin.String
|
|
// Public signature: /C.toString|6958853723545266802[0]
|
|
// Public signature debug description: toString(){}kotlin.String
|
|
override fun toString(): String
|
|
|
|
// CHECK:
|
|
// Mangled name: C#foo(kotlin.Any){}
|
|
// Public signature: /C.foo|-3585887913961670341[0]
|
|
// Public signature debug description: foo(kotlin.Any){}
|
|
override fun foo(i: Any): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: D
|
|
// Public signature: /D|null[0]
|
|
data class D : Java3 {
|
|
// CHECK:
|
|
// Mangled name: D{}a
|
|
// Public signature: /D.a|-1200697420457237799[0]
|
|
// Public signature debug description: {}a
|
|
val a: Int
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#<get-a>(){}kotlin.Int
|
|
// Public signature: /D.a.<get-a>|4232747788241509192[0]
|
|
// Public signature debug description: <get-a>(){}kotlin.Int
|
|
get
|
|
|
|
// CHECK:
|
|
// Mangled name: D#<init>(kotlin.Int){}
|
|
// Public signature: /D.<init>|-5182794243525578284[0]
|
|
// Public signature debug description: <init>(kotlin.Int){}
|
|
constructor(a: Int) /* primary */
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#component1(){}kotlin.Int
|
|
// Public signature: /D.component1|-8217597213800111288[0]
|
|
// Public signature debug description: component1(){}kotlin.Int
|
|
override operator fun component1(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#copy(kotlin.Int){}D
|
|
// Public signature: /D.copy|-9038476566104378393[0]
|
|
// Public signature debug description: copy(kotlin.Int){}D
|
|
fun copy(a: Int): D
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#equals(kotlin.Any?){}kotlin.Boolean
|
|
// Public signature: /D.equals|722809408929142791[0]
|
|
// Public signature debug description: equals(kotlin.Any?){}kotlin.Boolean
|
|
override operator fun equals(other: Any?): Boolean
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#hashCode(){}kotlin.Int
|
|
// Public signature: /D.hashCode|-8048879360829830756[0]
|
|
// Public signature debug description: hashCode(){}kotlin.Int
|
|
override fun hashCode(): Int
|
|
|
|
// CHECK JVM_IR:
|
|
// Mangled name: D#toString(){}kotlin.String
|
|
// Public signature: /D.toString|6958853723545266802[0]
|
|
// Public signature debug description: toString(){}kotlin.String
|
|
override fun toString(): String
|
|
|
|
// CHECK:
|
|
// Mangled name: D#foo(kotlin.Any){}
|
|
// Public signature: /D.foo|-3585887913961670341[0]
|
|
// Public signature debug description: foo(kotlin.Any){}
|
|
override fun foo(i: Any): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface
|
|
// Public signature: /KotlinInterface|null[0]
|
|
interface KotlinInterface {
|
|
// CHECK JVM_IR:
|
|
// Mangled name: KotlinInterface#component1(){}kotlin.Int
|
|
// Public signature: /KotlinInterface.component1|-8217597213800111288[0]
|
|
// Public signature debug description: component1(){}kotlin.Int
|
|
abstract fun component1(): Int
|
|
|
|
// CHECK:
|
|
// Mangled name: KotlinInterface#foo(kotlin.Any){}
|
|
// Public signature: /KotlinInterface.foo|-3585887913961670341[0]
|
|
// Public signature debug description: foo(kotlin.Any){}
|
|
abstract fun foo(i: Any): Unit
|
|
|
|
}
|
|
|
|
// CHECK:
|
|
// Mangled name: #test(){}
|
|
// Public signature: /test|6620506149988718649[0]
|
|
// Public signature debug description: test(){}
|
|
fun test(): Unit
|