data deprecations (empty constructors, non val/var arguments, vararg, superclasses) are now errors, relevant tests fixed
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
interface Id<T> {
|
||||
val id: T
|
||||
}
|
||||
|
||||
data class Actor (
|
||||
id: Int,
|
||||
val firstName: String,
|
||||
val lastName: String
|
||||
) : Id<Int> {
|
||||
override val id: Int = id
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val a1 = Actor(1, "Jeff", "Bridges")
|
||||
val a1copy = a1.copy(id = a1.id)
|
||||
|
||||
if (a1copy.id != a1.id) return "Failed: a1copy.id==${a1copy.id}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user