Files
kotlin-fork/compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.fir.kt
T
2021-07-08 18:13:48 +03:00

24 lines
577 B
Kotlin
Vendored

// !LANGUAGE: -DataClassInheritance
interface Allowed
open class NotAllowed
<!INCOMPATIBLE_MODIFIERS!>abstract<!> <!INCOMPATIBLE_MODIFIERS!>data<!> class Base(val x: Int)
class Derived: Base(42)
<!DATA_CLASS_OVERRIDE_CONFLICT!>data<!> class Nasty(val z: Int, val y: Int): Base(z)
data class Complex(val y: Int): Allowed, NotAllowed()
interface AbstractEqualsHashCodeToString {
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
override fun toString(): String
}
data class ImplInterface(val s: String) : AbstractEqualsHashCodeToString