List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
List<PType> copy = new ArrayList<PType>(node.getTypes()); for( PType e : copy)
@Override public PType caseATupleExp(ATupleExp node, TypeCheckInfo question) throws AnalysisException { node.setTypes(new LinkedList<PType>()); List<PType> types = node.getTypes(); List<PType> elemConstraints = null; if (question.constraint != null && question.assistantFactory.createPTypeAssistant().isProduct(question.constraint)) { elemConstraints = question.assistantFactory.createPTypeAssistant().getProduct(question.constraint).getTypes(); if (elemConstraints.size() != node.getArgs().size()) { elemConstraints = null; } } int i = 0; for (PExp arg : node.getArgs()) { question.qualifiers = null; if (elemConstraints == null) { types.add(arg.apply(THIS, question.newConstraint(null))); } else { types.add(arg.apply(THIS, question.newConstraint(elemConstraints.get(i++)))); } } node.setType(AstFactory.newAProductType(node.getLocation(), types)); return question.assistantFactory.createPTypeAssistant().possibleConstraint(question.constraint, node.getType(), node.getLocation()); }
ATupleExp te = (ATupleExp) exp; Iterator<PType> eit = pt.getTypes().iterator(); Iterator<PType> ait = te.getTypes().iterator(); po = null;