06d2befb72
#KT-59415 Fixed
18 lines
340 B
Kotlin
Vendored
18 lines
340 B
Kotlin
Vendored
// !LANGUAGE: -ProhibitDataClassesOverridingCopy
|
|
// IGNORE_BACKEND_K2: ANY
|
|
// FIR status: Disabling ProhibitDataClassesOverridingCopy is not supported
|
|
|
|
fun box(): String {
|
|
val a: A = B(1)
|
|
a.copy(1)
|
|
a.component1()
|
|
return "OK"
|
|
}
|
|
|
|
interface A {
|
|
fun copy(x: Int): A
|
|
fun component1(): Any
|
|
}
|
|
|
|
data class B(val x: Int) : A
|