Files
kotlin-fork/compiler/testData/codegen/box/traits/withRequiredGenericProperty.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

20 lines
310 B
Kotlin

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