if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this);
if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this);
if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) node.getClassDefinition().apply(this, question);
if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) mergeReturns(retVal,node.getClassDefinition().apply(this));
if(node.getClassDefinition() != null && !_visitedNodes.contains(node.getClassDefinition())) mergeReturns(retVal,node.getClassDefinition().apply(this, question));
public void updateDefs(AValueDefinition node, TypeCheckInfo question) { PType type = node.getType(); PPattern pattern = node.getPattern(); List<PDefinition> newdefs = af.createPPatternAssistant().getDefinitions(pattern, type, node.getNameScope()); // The untyped definitions may have had "used" markers, so we copy // those into the new typed definitions, lest we get warnings. We // also mark the local definitions as "ValueDefintions" (proxies), // so that classes can be constructed correctly (values are statics). for (PDefinition d : newdefs) { for (PDefinition u : node.getDefs()) { if (u.getName().equals(d.getName())) { if (af.createPDefinitionAssistant().isUsed(u)) { af.createPDefinitionAssistant().markUsed(d); } break; } } ALocalDefinition ld = (ALocalDefinition) d; ld.setValueDefinition(node.clone()); } node.setDefs(newdefs); List<PDefinition> defs = node.getDefs(); af.createPDefinitionListAssistant().setAccessibility(defs, node.getAccess().clone()); af.createPDefinitionListAssistant().setClassDefinition(defs, node.getClassDefinition()); }