KT-2963 VerifyError using traits with required classes

#KT-2963 Fixed
This commit is contained in:
Alexander Udalov
2012-11-01 15:25:29 +04:00
parent f139b637f3
commit cd35a6626e
3 changed files with 27 additions and 3 deletions
@@ -0,0 +1,15 @@
open class Base
trait Derived : Base {
fun foo(): String {
return object {
fun bar() = baz(this@Derived)
}.bar()
}
}
class DerivedImpl : Derived, Base()
fun baz(b: Base) = "OK"
fun box() = DerivedImpl().foo()