Files
kotlin-fork/compiler/testData/codegen/box/dataClasses/copy/kt12708.kt
T
2019-11-19 11:00:09 +03:00

17 lines
268 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitDataClassesOverridingCopy
// IGNORE_BACKEND_FIR: JVM_IR
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