I’ve got a class that has a handful of fields with the same type. is it possible to have a function that takes a reference to the field, does some computation then assigns the result to the field?
Copy code
fun assignGeneric(ref: ??, value String) {
// do stuff with value
ref = value
}