use of org.yakindu.base.types.validation.IValidationIssueAcceptor.ValidationIssue in project statecharts by Yakindu.
the class TypeValidator method assertIsSubType.
public void assertIsSubType(InferenceResult subResult, InferenceResult superResult, String msg, IValidationIssueAcceptor acceptor) {
if (subResult == null || superResult == null)
return;
if (!registry.isSuperType(subResult.getType(), superResult.getType())) {
msg = msg != null ? msg : String.format(ASSERT_COMPATIBLE, subResult, superResult);
acceptor.accept(new ValidationIssue(Severity.ERROR, msg, NOT_COMPATIBLE_CODE));
}
}
Aggregations