mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
23 lines
316 B
Kotlin
Vendored
23 lines
316 B
Kotlin
Vendored
// FILE: accessorForProtectedPropertyWithPrivateSetter.kt
|
|
import a.A
|
|
|
|
class B : A() {
|
|
fun test() = { -> vo + fk()() }
|
|
}
|
|
|
|
// FILE: a.kt
|
|
package a
|
|
|
|
open class A {
|
|
protected var vo = "O"
|
|
private set
|
|
|
|
protected var vk = ""
|
|
private set
|
|
|
|
fun fk() = { ->
|
|
vk = "K"
|
|
vk
|
|
}
|
|
}
|