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+.
16 lines
214 B
Kotlin
Vendored
16 lines
214 B
Kotlin
Vendored
// LANGUAGE_VERSION: 1.1
|
|
|
|
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
|