Files
kotlin-fork/compiler/testData/codegen/box/traits/withRequiredProperty.kt
T
Alexander Udalov 242b97febf Fix mapGetterSignature/mapSetterSignature
In case of TRAIT_IMPL the incorrect this was written. Reuse the code from the
common mapSignature

 #KT-3413 Fixed
2013-03-15 22:03:39 +04:00

18 lines
251 B
Kotlin

open class Base {
var s = "Fail"
}
trait Trait : Base {
var value : String
get() = s
set(value) { s = value }
}
class Derived : Trait, Base()
fun box(): String {
val d = Derived()
d.value = "OK"
return d.value
}