[FIR] NOTHING_TO_OVERRIDE diagnostic
This commit is contained in:
committed by
teamcityserver
parent
9452b788bf
commit
b44785c24e
-25
@@ -1,25 +0,0 @@
|
||||
// KT-11306 ABSTRACT_MEMBER_NOT_IMPLEMENTED for data class should inheriting interfaces requiring equals(), hashCode(), or toString()
|
||||
|
||||
interface Foo {
|
||||
override fun equals(other: Any?): Boolean
|
||||
override fun hashCode(): Int
|
||||
override fun toString(): String
|
||||
}
|
||||
|
||||
data class FooImpl(val num: Int) : Foo
|
||||
|
||||
data class FooImplSome(val num: Int) : Foo {
|
||||
override fun hashCode() = 42
|
||||
}
|
||||
|
||||
data class FooImplAll(val num: Int) : Foo {
|
||||
override fun equals(other: Any?) = false
|
||||
override fun hashCode() = 42
|
||||
override fun toString() = "OK"
|
||||
}
|
||||
|
||||
|
||||
data class WrongSignatures(val num: Int) : Foo {
|
||||
override fun equals(other: WrongSignatures) = false
|
||||
override fun hashCode(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>Boolean<!> = true
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// KT-11306 ABSTRACT_MEMBER_NOT_IMPLEMENTED for data class should inheriting interfaces requiring equals(), hashCode(), or toString()
|
||||
|
||||
interface Foo {
|
||||
|
||||
Reference in New Issue
Block a user