function-return-parameter-membership
Available in: KerML, SysML
This checks that functions have at most one return parameter.
Note: this matches the Pilot implementation for
validateFunctionResultParameterMembership constraint and only checks owned
memberships.
Specification
A
Functionmust have exactly onefeature_membership(owned or inherited) that is aResultParameterMembership.
(Yes, looks like a typo in the specification.)
Example
calc def C {
return attribute = 4;
return attribute = 4; // error
}
Remove the additional return parameters:
calc def C {
return attribute = 4; // ok
}