Fix 'Redundant override' when delegated member hides super type override
So #KT-20231 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
3daee25ce8
commit
bbb571260b
+14
@@ -0,0 +1,14 @@
|
||||
// PROBLEM: none
|
||||
interface Foo {
|
||||
fun test(arg: String)
|
||||
}
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: String) {}
|
||||
open fun test(a: Int) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
override <caret>fun test(arg: String) = super.test(arg)
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// PROBLEM: none
|
||||
interface A
|
||||
|
||||
interface B {
|
||||
fun test(arg: String)
|
||||
}
|
||||
|
||||
interface Foo : A, B
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: String) {}
|
||||
open fun test(a: Int) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
override <caret>fun test(arg: String) = super.test(arg)
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
interface Foo {
|
||||
fun test(arg: Int)
|
||||
}
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: Int) {}
|
||||
open fun test(a: String) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
override <caret>fun test(a: String) = super.test(a)
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
interface Foo {
|
||||
fun test(arg: Int)
|
||||
}
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: Int) {}
|
||||
open fun test(a: String) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
interface Foo {
|
||||
fun test(arg: Int)
|
||||
}
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: Int) {}
|
||||
open fun test(a: String) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
override <caret>fun test2(arg: Int) = super.test2(arg)
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
interface Foo {
|
||||
fun test(arg: Int)
|
||||
}
|
||||
|
||||
open class Bar : Foo {
|
||||
override fun test(arg: Int) {}
|
||||
open fun test(a: String) {}
|
||||
open fun test2() {}
|
||||
}
|
||||
|
||||
class Baz(val foo: Foo) : Bar(), Foo by foo {
|
||||
}
|
||||
Reference in New Issue
Block a user