mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
17 lines
250 B
Kotlin
Vendored
17 lines
250 B
Kotlin
Vendored
open class X(s : String) {
|
|
public var n: String = s
|
|
private set
|
|
|
|
}
|
|
|
|
class Z : X("subclass") {
|
|
fun print(): String {
|
|
<!INVISIBLE_SETTER!>n<!> = n
|
|
return n;
|
|
}
|
|
}
|
|
|
|
|
|
fun box() : String {
|
|
return Z().print() //error
|
|
} |