1bf3bde4f8
^KT-59057 Merge-request: KT-MR-10749 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
15 lines
301 B
Kotlin
Vendored
15 lines
301 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// TARGET_BACKEND: JVM_IR
|
|
|
|
data class A(val s: String) : Cloneable {
|
|
fun externalClone(): A = clone() as A
|
|
}
|
|
|
|
fun box(): String {
|
|
val a = A("OK")
|
|
val b = a.externalClone()
|
|
if (a != b) return "Fail equals"
|
|
if (a === b) return "Fail identity"
|
|
return b.s
|
|
}
|