major
minor
Attributes can be abstract. Such attributes must be redeclared in sub-classes. An abstract attribute cannot be accessed (neither read nor write).
However, such attributes can currently be accessed without error if the object is transient. In this case, however, an error should also be generated in order to better identify the model inconsistency.
Code migration
Previously, abstract attributes could be incorrectly accessed read-only (returned null). With this change, an error is thrown each time an abstract attribute is accessed. This can have an impact on specialist models in which an inherited abstract attribute (such as StructuredElement#parent) has not been appropriately redeclared (usually in the root type).
A structure based on StructuredElement must be structured like this:
// Top-level type of the structure - each type must extend it. MyNode extends StructuredElement { parent: MyContainer } // Abstract child type in the structure - each type with substructure must extend it. abstract MyContainer extends MyNode, StructuredElementContainer { } // Concrete type with children. NodeA extends MyContainer { children: ... } NodeB extends MyContainer { children: ... } // Concrete type without children. NodeC extends MyNode { }