It seems like having uninitialized members in the object body is forbidden in Scala objects.. I wanted to do something like (if it was in Java)
class MyClass {
private String str;
private String reassignString(String value) {
str = value;
}
I'm restricted on changing this code from object to class (since this repo is used by many teams) - what's a good Scala way to handle this kind of situation? Sorry the question is really vague.