[Rd] callNextMethod and "..." issue

From: Michael Lawrence <lawrence.michael_at_gene.com>
Date: Tue, 21 Aug 2012 05:25:39 -0700


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]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 21 Aug 2012 - 12:29:02 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 21 Aug 2012 - 15:10:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive