Direct field access for private var


Hi, just want to ask if there is a way to prevent get/set method to be generated for private var field in kotlin? something similar like private[this] var in scala.


Kotlin does not generate getters or setters for private properties that do not have custom accessors. Access to such properties is compiled as direct field access.


Good to hear that. Thanks!