invocation-expression-instantiated-type
Available in: KerML, SysML
This checks that invocation expression invoke other behaviors, or features
typed by a single behavior.
Behaviors are the only callable element type in KerML and SysML. Otherwise,
elements have implicit constructors that must be called using constructor
expressions using the keyword new.
Specification
The
instantiated_typeof anInvocationExpressionmust be either aBehavioror aFeaturewith a singletype, which is aBehavior.
Example
attribute def A;
attribute a = A(); // error
Use constructor expression instead:
attribute def A;
attribute a = new A(); // ok