Do not add extra 'this' parameter for TImpl's accessor
Fixes weird cases like super-call from a closure inside a trait with a required class
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
open class Base {
|
||||
open fun foo() { }
|
||||
}
|
||||
|
||||
trait Derived : Base {
|
||||
override fun foo() {
|
||||
super.foo()
|
||||
}
|
||||
}
|
||||
|
||||
class DerivedImpl : Derived, Base()
|
||||
|
||||
fun box(): String {
|
||||
DerivedImpl().foo()
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
open class Base {
|
||||
open fun foo() { }
|
||||
}
|
||||
|
||||
trait Derived : Base {
|
||||
override fun foo() {
|
||||
object {
|
||||
fun bar() {
|
||||
super<Base>@Derived.foo()
|
||||
}
|
||||
}.bar()
|
||||
}
|
||||
}
|
||||
|
||||
class DerivedImpl : Derived, Base()
|
||||
|
||||
fun box(): String {
|
||||
DerivedImpl().foo()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user