public void visitApply(JCMethodInvocation tree) {
        tree.meth = translate(tree.meth, null);
        Symbol meth = TreeInfo.symbol(tree.meth);
        Type mt = meth.erasure(types);
        List<Type> argtypes = mt.getParameterTypes();
        if (allowEnums &&
            meth.name==names.init &&
            meth.owner == syms.enumSym)
            argtypes = argtypes.tail.tail;
        if (tree.varargsElement != null)
            tree.varargsElement = types.erasure(tree.varargsElement);
        else
            assert tree.args.length() == argtypes.length();
        tree.args = translateArgs(tree.args, argtypes, tree.varargsElement);

        // Insert casts of method invocation results as needed.
        result = retype(tree, mt.getReturnType(), pt);
    }