[FIR] Implement RETURN_TYPE_MISMATCH_BY_DELEGATION diagnostic
This commit is contained in:
committed by
teamcityserver
parent
94da1e37aa
commit
8c7ee0b714
+1
-1
@@ -6,7 +6,7 @@ open class IDerived1 : IBase1 {
|
||||
override fun foo(): String = "1"
|
||||
}
|
||||
|
||||
<!DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE!>class Broken1<!>(val b: IBase1) : IBase1 by b, IDerived1()
|
||||
<!DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE, RETURN_TYPE_MISMATCH_BY_DELEGATION!>class Broken1<!>(val b: IBase1) : IBase1 by b, IDerived1()
|
||||
|
||||
interface IBase2 {
|
||||
val foo: Any
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ interface IDerived1 {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
class Broken1(val b: IBase1) : IBase1 by b, IDerived1
|
||||
<!RETURN_TYPE_MISMATCH_BY_DELEGATION!>class Broken1<!>(val b: IBase1) : IBase1 by b, IDerived1
|
||||
|
||||
interface IBase2 {
|
||||
val foo: Any
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ object AImpl : IA {
|
||||
override fun foo() = 42
|
||||
}
|
||||
|
||||
open class C : IA by AImpl, IB
|
||||
open <!RETURN_TYPE_MISMATCH_BY_DELEGATION!>class C<!> : IA by AImpl, IB
|
||||
|
||||
class D : C() {
|
||||
override fun foo(): Double = 3.14
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ interface IDerived1 : IBase1 {
|
||||
override fun foo(): String
|
||||
}
|
||||
|
||||
class Broken1(val b: IBase1) : IBase1 by b, IDerived1
|
||||
<!RETURN_TYPE_MISMATCH_BY_DELEGATION!>class Broken1<!>(val b: IBase1) : IBase1 by b, IDerived1
|
||||
|
||||
interface IBase2 {
|
||||
val foo: Any
|
||||
|
||||
Reference in New Issue
Block a user