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.
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 thegetSupertypesOf
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 ofgetSupertypesOf
ingetAllEndFeaturesOf
to a call togetGeneralTypesOf
, which treats the final feature of a feature chain as an effective general type.