The name and package of the current generic function is stored in the
environment of the method definition object. This name is looked up
and the corresponding function called. The statement that passing no arguments to callGeneric
causes
the generic function to be called with the current arguments is
more precisely as follows. Arguments that were missing in the current
call are still missing (remember that "missing"
is a valid
class in a method signature). For a formal argument, say x
, that
appears in the original call, there is a corresponding argument in the
generated call equivalent to x = x
. In effect, this
means that the generic function sees the same actual arguments, but
arguments are evaluated only once.
Using callGeneric
with no arguments is prone to creating
infinite recursion, unless one of the arguments in the signature has
been modified in the current method so that a different method is selected.