Refactor DelegationResolver
Fix an issue in lazy resolve : filter out methods from delegated traits superclass
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package test
|
||||
|
||||
abstract class A {
|
||||
abstract fun foo()
|
||||
}
|
||||
|
||||
trait X : A {
|
||||
fun bar() {
|
||||
}
|
||||
}
|
||||
|
||||
open class B() : A() {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class C() : A(), X {
|
||||
override fun foo() {
|
||||
}
|
||||
}
|
||||
|
||||
class D(val c: C) : B(), X by c {
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package test
|
||||
|
||||
internal abstract class A {
|
||||
/*primary*/ public constructor A()
|
||||
internal abstract fun foo(): jet.Unit
|
||||
}
|
||||
|
||||
internal open class B : test.A {
|
||||
/*primary*/ public constructor B()
|
||||
internal open override /*1*/ fun foo(): jet.Unit
|
||||
}
|
||||
|
||||
internal final class C : test.A, test.X {
|
||||
/*primary*/ public constructor C()
|
||||
internal open override /*1*/ /*fake_override*/ fun bar(): jet.Unit
|
||||
internal open override /*2*/ fun foo(): jet.Unit
|
||||
}
|
||||
|
||||
internal final class D : test.B, test.X {
|
||||
/*primary*/ public constructor D(/*0*/ c: test.C)
|
||||
internal final val c: test.C
|
||||
internal final fun <get-c>(): test.C
|
||||
internal open override /*1*/ /*delegation*/ fun bar(): jet.Unit
|
||||
internal open override /*2*/ /*fake_override*/ fun foo(): jet.Unit
|
||||
}
|
||||
|
||||
internal trait X : test.A {
|
||||
internal open fun bar(): jet.Unit
|
||||
internal abstract override /*1*/ /*fake_override*/ fun foo(): jet.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user