It seems that there is an issue when calling callNextMethod() inside a
method without "..." in its formals but defined on a generic WITH
"..." in
its formals. Whenever that method is called with an argument that is not
explicitly named in the generic formals, we get the following error:
setClass("A")
setClass("B", contains = "A")
setGeneric("fun", function(x, ...) standardGeneric("fun"))
setMethod("fun", "A", function(x, y) x)
setMethod("fun", "B", function(x, y) callNextMethod())
fun(new("B"), "foo")
Error in callNextMethod() :
in processing 'callNextMethod', found a '...' in the matched
call, but no
corresponding '...' argument
Is this a misuse of callNextMethod?
Thanks,
Michael
[[alternative HTML version deleted]]