assert (args.length != 1 || !(args[0] instanceof Tree.Sequence)); if (( mode & PATTERNmode ) != 0 )
if (( mode & PATTERNmode ) != 0 ) {
    Type[] transformArgs(int pos, Symbol meth, Symbol[] tparams, Type methtype,			 int argMode, Tree[] args, Type pt) {	//System.out.println("trans args " + meth + ArrayApply.toString(tparams) + ":" + methtype + "," + pt);//DEBUG	Type[] argtypes = new Type[args.length];	switch (methtype) {	case MethodType(Symbol[] params, Type restp):	    Type[] formals = infer.formalTypes(params, args.length);	    if (formals.length != args.length) {		error(pos, "wrong number of arguments for " + 		      (meth == null ? "<function>" : meth) + 		      ArrayApply.toString(formals, "(", ",", ")"));		return null;	    }	    if (tparams.length == 0) {		for (int i = 0; i < args.length; i++) {		    args[i] = transform(args[i], argMode, formals[i]);		    argtypes[i] = args[i].type;		}	    } else {		// targs: the type arguments inferred from the prototype		Type[] targs = infer.protoTypeArgs(tparams, restp, pt, params);		// argpts: prototypes for arguments		Type[] argpts = new Type[formals.length];		for (int i = 0; i < formals.length; i++)		    argpts[i] = formals[i].subst(tparams, targs); 		// transform arguments with [targs/tparams]formals as prototypes		for (int i = 0; i < args.length; i++)		    args[i] = transform(			args[i], argMode | POLYmode, formals[i].subst(tparams, targs));				// targs1: same as targs except that every AnyType is mapped to		// formal parameter type.		Type[] targs1 = new Type[targs.length];		for (int i = 0; i < targs.length; i++)		    targs1[i] = (targs[i] != Type.AnyType) ? targs[i]			: tparams[i].type();		for (int i = 0; i < args.length; i++) {		    argtypes[i] = args[i].type;		    switch (argtypes[i]) {		    case PolyType(Symbol[] tparams1, Type restype1):			argtypes[i] = infer.argumentTypeInstance(			    tparams1, restype1, 			    formals[i].subst(tparams, targs1), 			    argpts[i]);		    }		}	    }	    //   desugarizing ident patterns	    if (params.length == 1 && (params[0].flags & REPEATED) != 0) {		assert (args.length != 1 || !(args[0] instanceof Tree.Sequence));		if (( mode & PATTERNmode ) != 0 )		    desug_allIdentPatterns( args, context.owner );	    }	    	    return argtypes;	case PolyType(Symbol[] tparams1, Type restp):	    Symbol[] tparams2;	    if (tparams.length == 0) tparams2 = tparams1;	    else {		tparams2 = new Symbol[tparams.length + tparams1.length];		System.arraycopy(tparams, 0, tparams2, 0, tparams.length);		System.arraycopy(tparams1, 0, tparams2, tparams.length, tparams1.length);	    }	    return transformArgs(pos, meth, tparams2, restp, argMode, args, pt);	case Type.ErrorType:	    for (int i = 0; i < args.length; i++) {		args[i] = transform(args[i], argMode, Type.ErrorType);		argtypes[i] = args[i].type;	    }	    return argtypes;	default:	    for (int i = 0; i < args.length; i++) {		args[i] = transform(args[i], argMode, Type.AnyType);		argtypes[i] = args[i].type;	    }	    return argtypes;	}    }