b7d8e879a6
In particular, this commit includes: * Attempt to abstract access to FirSourceElement via FirModifier * Add more visit functions to DeclarationCheckersDiagnosticComponent * Add messages+factories for 4 modifier-related errors and warnings * Introduce FirModifierChecker
24 lines
542 B
Kotlin
Vendored
24 lines
542 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 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
|