class A { public var x: Int = 0 private set } fun main(args: Array) { val a = A() a.x = 1 }