constructor-expression-no-duplicate-feature-redefinition
Available in: KerML, SysML
This checks that constructor arguments are bound only once.
In textual syntax, this is only possible by using named arguments as otherwise arguments are bound implicitly in the order features are declared or inherited.
Specification
Two different
owned_featuresof theresultof aConstructorExpressionmust not redefine the samefeatureof theinstantiated_typeof theConstructorExpression.
Example
part def F { a; b; }
x = new F(a=0, a=1); // error
Bind arguments only once:
part def F { a; b; }
x = new F(a=0, b=1); // ok