constructor-expression-result-feature-redefinition
Available in: KerML, SysML
This checks that constructors arguments are bound to the instantiated type features only, and only once, i.e. that there are no extraneous or unrelated arguments.
Specification
Each
owned_featureof theresultof aConstructionExpressionmust redefine exactly onepublicfeatureof theinstantiated_typeof theConstructorExpression.
Example
attribute def A;
attribute a = new A(0, 2); // error: Unexpected argument: constructor expression argument must redefine a public feature
Remove extraneous arguments:
attribute def A;
attribute a = new A(0); // ok