Systems-Modeling / SysML-v2-Pilot-Implementation

Proof-of-concept pilot implementation of the SysML v2 textual notation and visualization
GNU Lesser General Public License v3.0
114 stars 23 forks source link

ST6RI-698 Implicit specializations not added when there are circular owned specializations #491

Closed seidewitz closed 11 months ago

seidewitz commented 11 months ago

Corrects the TypeAdapter::removeUnnecessaryImplicitGeneralTypes method so that it does not remove implicit specializations from types that are part of a chain of circular owned specializations. Declarations such as the following no longer produce errors:

part def A :> A;

part def B :> C;
part def C :> B;

In the case of a circle of two or more types, the implicit specialization is added to the lexically last one processed (e.g., C in the example above), though it would also have been legal to add the implicit specialization to any or all of the types in the circle.