use of org.eclipse.titan.designer.AST.TTCN3.templates.Any_Value_Template in project titan.EclipsePlug-ins by eclipse.
the class SuperfluousTemplate method visit.
@Override
public int visit(final IVisitableNode node) {
if (node instanceof TemplateInstance) {
template = (TemplateInstance) node;
final ITTCN3Template body = template.getTemplateBody();
if (body instanceof Any_Value_Template || body instanceof AnyOrOmit_Template) {
final Type type = template.getType();
if (type == null) {
// port.receive(?) or port.receive(*)
receivesAny = true;
} else if (receivableType != null && type.isIdentical(CompilationTimeStamp.getBaseTimestamp(), receivableType)) {
// e.g. port.receive(integer:?)
receivesAllOfType = true;
}
}
// We don't want to investigate nested templates
return V_SKIP;
}
return V_CONTINUE;
}
Aggregations