Direct field access for private var


#1

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.


#2

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.


#3

Good to hear that. Thanks!