does the initialization call my custom setter?
# announcements
a
does the initialization call my custom setter?
a
Copy code
class Test(value: Int) {
    var myValue: Int = value
    	set(value) {
            println("Setting value $value")
            field = value
        }
}

fun main(args: Array<String>) {
    val test = Test(1)
    test.myValue = 2
}
This will only print out "2". You'll never see the 1 (initial value) printed.