Fix errors with annotations, type parameters and varargs