I have many optional variables which are subclasses of the same class:
var variable1: Experience.subclass1!
var variable2: Experience.subclass2!
var variable3: Experience.subclass3!
...
I want to use a common variable which can copy the value from any of these optional variables for easy code writing. Example:
var commonVariable = variable1
...
commonVariable = variable2 // change the value inside another function
Any ideas on how to enable this functionality? This will greatly simplify my code.