feature-value-overriding
Available in: KerML, SysML
This checks that redefined features have either no feature values, or default
feature values if the redefining feature itself has feature value.
Specification
All
Featuresdirectly or indirectly redefined by thefeature_with_valueof aFeatureValuemust have onlydefaultFeatureValues.
Example
attribute def A {
attribute a = 5;
}
attribute def B :> A {
attribute a :>> a = 6; // error
}
Instead, use default feature value on the redefined feature:
attribute def A {
attribute a default 5;
}
attribute def B :> A {
attribute a :>> a = 6; // ok
}
Or remove feature value from the redefining feature:
attribute def A {
attribute a = 5;
}
attribute def B :> A {
attribute a :>> a; // ok
}