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-699 End features inherited via feature chains are not redefined #494

Closed seidewitz closed 11 months ago

seidewitz commented 11 months ago

The TypeUtil::getAllEndFeaturesOf method is used to get the owned and inherited end features of a type without processing the entire set of inherited features of the type. It used the getSupertypesOf method to get the supertypes of the give type, in order to recurse up the specialization tree. However, this does not account for the possibility that the given type is a feature with a feature chain, in which case ends features can be effectively inherited from the final feature in the chain. This pull request fixes the bug by changing the call of getSupertypesOf in getAllEndFeaturesOf to a call to getGeneralTypesOf, which treats the final feature of a feature chain as an effective general type.