p instanceof Tree.BaseMemberExpression) {
Tree.MemberOrTypeExpression mte =
(Tree.MemberOrTypeExpression) p;
if (p.getTypeModel()!=null &&
mte.getDeclaration()!=null) {
ProducedType pt = p.getTypeModel();
if (pt!=null) {
for (int j=0; j<that.getParameterLists().size(); j++) {
Tree.ParameterList pl =
that.getParameterLists().get(j);
ProducedType ct =
pt.getSupertype(unit.getCallableDeclaration());
String refName =
mte.getDeclaration().getName();
if (ct==null) {
pl.addError("no matching parameter list in referenced declaration: '" +
refName + "'");
}
else if (ct.getTypeArgumentList().size()>=2) {
ProducedType tupleType =
ct.getTypeArgumentList().get(1);
List<ProducedType> argTypes =
unit.getTupleElementTypes(tupleType);
boolean variadic =
unit.isTupleLengthUnbounded(tupleType);
boolean atLeastOne =
unit.isTupleVariantAtLeastOne(tupleType);
List<Tree.Parameter> params = pl.getParameters();
if (argTypes.size()!=params.size()) {
pl.addError("wrong number of declared parameters: '" +
refName + "' has " + argTypes.size() +
" parameters");
}
for (int i=0; i<argTypes.size()&&i<params.size(); i++) {
ProducedType at = argTypes.get(i);
Tree.Parameter param = params.get(i);
ProducedType t = param.getParameterModel().getModel()
.getTypedReference()
.getFullType();
String paramName = param.getParameterModel().getName();
checkAssignable(at, t, param,
"type of parameter '" + paramName +