Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt
T
Dmitry Petrov 31996f1139 Update "defaultness" for property accessor with inherited visibility
Property accessor that overrides a non-default property accessor with
visibility different from the property visibility was incorrectly
considered "default". Corresponding metadata was written incorrectly,
and 'internal' setter call caused NSME

 #KT-23044 Fixed Target versions 1.2.40
2018-03-02 10:54:32 +03:00

17 lines
235 B
Kotlin
Vendored

// FILE: A.kt
abstract class Base {
abstract var x: String
internal set
}
class Derived: Base() {
override var x: String = "Z"
}
// FILE: B.kt
fun box(): String {
val d = Derived()
d.x = "OK"
return d.x
}