mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Fix concrete method inheritance in interfaces
For each non-abstract non-declared (i.e. inherited from supertypes) method in an interface we generate its static form to the TImpl, which calls the TImpl method from the corresponding supertype. The accidental override tests changed because we're now trying to generate the delegate for the super method, not knowing that it will clash with the declared method #KT-2888 Fixed #KT-5393 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
public interface Base {
|
||||
default String foo() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
interface K1 : Base
|
||||
|
||||
interface K2 : K1
|
||||
|
||||
interface K3 : K2
|
||||
|
||||
class C : K3 {
|
||||
override fun foo() = super.foo()
|
||||
}
|
||||
|
||||
fun box(): String = C().foo()
|
||||
Reference in New Issue
Block a user