Detail
#27881
Suboptimal check for isDerived() in the implementation of the TL script copy()
The com.top_logic.model.search.expr.config.operations.Copy.InitialOperation.copyValues(TLObject, TLObject) method checks, among other things, whether the attribute to be copied is calculated (part.isDerived()), and if so, it is ignored.
However, this check takes place on the attribute of the source object, but should be checked on the attribute of the target object.
You can change the type during the copy operation. If you copy from a type that declares an attribute as calculated to a type that defines the attribute as writable, the copy operation should set the calculated value to the writable attribute.
You can still read from a read-only attribute and write to a writeable attribute, whereas you cannot write to a read-only attribute, even if the source attribute is writeable.
Test
- test.com.top_logic.model.search.expr.TestSearchExpression.testCopyConstructor()