trigger-invocation-expression-when-argument
Available in: SysML
This checks that when expression has a boolean result type.
Specification
If a
TriggerInvocationExpressionhaskind = when, then it must have anargumentthat is aFeatureReferenceExpressionwhosereferentis anExpressionwith aresultthat conforms to the typeScalarValues::Boolean.
Example
action {
accept when 42; // error
}
Use a boolean expression instead:
action {
accept when true; // ok
}