@Override
 public void visit(Tree.InvocationExpression that) {
   ProducedType ort = requiredType;
   ProducedReference onat = namedArgTarget;
   PositionalArgumentList pal = that.getPositionalArgumentList();
   if (pal != null) {
     int pos;
     if (node == pal) {
       // TODO: this is wrong!!
       //      we need to look at the offset and
       //      determine if we are at the start
       //      or end of the parameter list!
       pos = pal.getPositionalArguments().size();
     } else {
       pos = pal.getPositionalArguments().size();
       for (int i = 0; i < pos; i++) {
         Tree.PositionalArgument pa = pal.getPositionalArguments().get(i);
         if (node.getStartIndex() >= pa.getStartIndex()
             && node.getStopIndex() <= pa.getStopIndex()) {
           pos = i;
           break;
         }
       }
     }
     ProducedReference pr = getTarget(that);
     if (pr != null) {
       List<Parameter> params = getParameters(pr);
       if (params != null && params.size() > pos) {
         Parameter param = params.get(pos);
         requiredType = pr.getTypedParameter(param).getFullType();
         if (param.isSequenced()) {
           requiredType = that.getUnit().getIteratedType(requiredType);
         }
       }
     }
   }
   NamedArgumentList nal = that.getNamedArgumentList();
   if (nal != null) {
     namedArgTarget = getTarget(that);
     if (namedArgTarget != null) {
       List<Parameter> params = getParameters(namedArgTarget);
       if (params != null && !params.isEmpty()) {
         Parameter param = params.get(params.size() - 1);
         if (param.isSequenced()) {
           requiredType = namedArgTarget.getTypedParameter(param).getFullType();
           requiredType = that.getUnit().getIteratedType(requiredType);
         }
       }
     }
   }
   super.visit(that);
   requiredType = ort;
   namedArgTarget = onat;
 }
 @Override
 public void visit(Tree.SpecifiedArgument that) {
   ProducedType ort = requiredType;
   Parameter p = that.getParameter();
   if (p != null) {
     if (namedArgTarget != null) {
       requiredType = namedArgTarget.getTypedParameter(p).getType();
     } else {
       requiredType = p.getType();
     }
   }
   super.visit(that);
   requiredType = ort;
 }
 private static List<Parameter> getParameters(ProducedReference pr) {
   List<ParameterList> pls = ((Functional) pr.getDeclaration()).getParameterLists();
   return pls.isEmpty() ? null : pls.get(0).getParameters();
 }