Files
kotlin-fork/compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.kt
T
Alexander Udalov 55f9f74d5c Tests: do not report backend diagnostics if there's frontend error
In most affected tests, the backend diagnostic such as "conflicting JVM
signature" or "accidental override" is directly caused by some already
existing error reported by frontend, so it doesn't make sense to check
backend diagnostics there.

Tests where that was not the case were moved/copied to
`testsWithJvmBackend`.
2024-03-13 08:38:15 +00:00

10 lines
289 B
Kotlin
Vendored

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