4c2cfd3ea9
Synthesized 'copy' introduces default values for parameters, which is prohibited for regular overrides. Report warning in language version 1.2-, error in 1.3+.
7 lines
210 B
Kotlin
Vendored
7 lines
210 B
Kotlin
Vendored
// !LANGUAGE: -ProhibitDataClassesOverridingCopy
|
|
|
|
interface WithCopy<T> {
|
|
fun copy(str: T): WithCopy<T>
|
|
}
|
|
|
|
<!DATA_CLASS_OVERRIDE_DEFAULT_VALUES_WARNING!>data<!> class Test(val str: String): WithCopy<String> |