From maechler at stat.math.ethz.ch  Fri Sep 22 09:54:54 2006
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Fri, 22 Sep 2006 09:54:54 +0200
Subject: [Rd] Possible bug in base::namespaceImportFrom?
In-Reply-To: <m2bqp8mrkf.fsf@ziti.local>
References: <m2bqp8mrkf.fsf@ziti.local>
Message-ID: <17683.38606.476190.127928@stat.math.ethz.ch>

>>>>> "Seth" == Seth Falcon <sfalcon at fhcrc.org>
>>>>>     on Thu, 21 Sep 2006 21:52:00 -0700 writes:

    Seth> Hi, namespaceImportFrom in base/R/namespace.R has the
    Seth> following:

    Seth>        fdef <- methods:::getGeneric(genName, impenv)

    Seth> The definition of getGeneric is in
    Seth> methods/R/RMethodUtils.R starts with:

    Seth>     getGeneric <- 
    ......
    Seth>  function(f, mustFind = FALSE, where = .........)

    Seth> I think the call to getGeneric in namespaceImportFrom
    Seth> should use named arguments because impenv, an
    Seth> environment, will be assigned to the mustFind arg
    Seth> which is most likely not desired.

Indeed. Well spotted, Seth!
Fixed and committed for R-devel and R-beta.

Martin




[Rd] Possible bug in base::namespaceImportFrom?
Martin Maechler