Files
kotlin-fork/compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.fir.kt
T
2023-10-11 08:54:09 +00:00

10 lines
311 B
Kotlin
Vendored

// !LANGUAGE: +ProhibitDataClassesOverridingCopy
interface WithCopy<T> {
fun copy(str: T): WithCopy<T>
}
<!DATA_CLASS_OVERRIDE_DEFAULT_VALUES!>data<!> class <!CONFLICTING_OVERLOADS!>Test(val str: String)<!> : WithCopy<String> {
<!CONFLICTING_OVERLOADS!>override fun copy(str: String)<!> = Test(str)
}