[FIR] NOTHING_TO_OVERRIDE diagnostic
This commit is contained in:
committed by
teamcityserver
parent
9452b788bf
commit
b44785c24e
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// fir reports NOTHING_TO_OVERRIDE because it keeps only one definition of p.Base
|
||||
// MODULE: m1
|
||||
// FILE: x.kt
|
||||
package p
|
||||
|
||||
public interface Base {
|
||||
public fun <T> foo(t: Array<T>) {}
|
||||
}
|
||||
|
||||
public interface A : Base
|
||||
|
||||
// MODULE: m2
|
||||
// FILE: x.kt
|
||||
package p
|
||||
|
||||
public interface Base {
|
||||
public fun <T: Base> foo(t: Array<T>) {}
|
||||
}
|
||||
|
||||
public interface B : Base
|
||||
|
||||
// MODULE: m3(m1, m2)
|
||||
// FILE: x.kt
|
||||
|
||||
import p.*
|
||||
|
||||
class Foo: A, B {
|
||||
override fun <T> foo(t: Array<T>) {}
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun <T: Base> foo(t: Array<T>) {}
|
||||
}
|
||||
Vendored
+1
-2
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1
|
||||
// FILE: x.kt
|
||||
package p
|
||||
@@ -27,4 +26,4 @@ import p.*
|
||||
class Foo: A, B {
|
||||
override fun <T> foo(t: Array<T>) {}
|
||||
override fun <T: Base> foo(t: Array<T>) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user