I have a case class that looks like this:
case class Outcome(text: Symbol)
Now I need to change the meaning of the text at runtime. I am trying to do something like this:
val o2 = o1.copy(text.name = "foo" ++ text.name)
This obviously gives me a compilation error:
type mismatch; found : String required: Symbol
How to convert a character to a string, add / add something and change it to a character again? Or, to be simpler, how can I change the name of a character?
source share