The "name" property is an instance of EString and is copied as expected. However, the "visibility" property is an instance of EEnumLiteral, and copying its value as shown above produces a ClassCastException. I don't understand why the two properties are treated differently.
I have also tried the following assignment:
target.visibility ::= source.visibility;
In this case, the value of target.visibility is always set to "public", regardless of the value of source.visibility.
In short, my question is: how can I copy the value of the "visibility" property to the target?