redefinition-featuring-types

Available in: KerML, SysML

This checks that redefining feature featuring types different to the featuring types of the redefined feature.

Specification

The redefining_feature of a Redefinition must have at least one featuring_type that is not also a featuring_type of the redefined_feature.

Example

This can be triggered by a package-level feature redefining another package-level feature:

attribute a;
attribute b :>> a; // error

Instead, redefine package-level features from a type:

attribute a;
part def P { attribute b :>> a; } // ok

Additionally, this can be triggered in KerML by overriding default featuring types:

class A { feature a; }
feature b :>> A::a featured by A; // error

Instead, prefer overriding only package-level, or directly inherited features:

class A { feature a; }
class B :> A { feature b :>> A::a; } // ok