Hi there! Am I right in assuming it’s not possible...
# getting-started
s
Hi there! Am I right in assuming it’s not possible to declare a custom setter for a field initialized in the primary constructor?
o
Seems right to me
m
This may look similar to typical initialization in Java.
Copy code
class Sample(str: String) {
    val str: String
        set(new) = {…}

    init {
        this.str = str
    }
}
s
Thanks, this will probably do
v
set() = {}
won't probably do it