is setter for a field called for the initial value...
# announcements
g
is setter for a field called for the initial value?
🚫 1
k
That's easy to test:
Copy code
class Test {
    var foo = 5
        set(value) {
            println("set $value")
            field = value
        }
}

fun main() {
    val test = Test()
    test.foo = 6
}
k
I'm pretty sure it just sets the field, but I could be wrong