Skip to content

strange behavior in 'inherits' check for loaded S4 object

2 messages · Kevin Ushey, John Chambers

#
Hi Martin, John,

Thanks for the responses! I've tidied up some of the notes from this
mailing list thread and posted them on the bug tracker.

John, in this case, I think namespaces are relevant because for
non-exported S4 classes, the class information is made available
through the '.__C__<package>' symbol in the package's namespace, but
not the package environment that gets attached to the search path. In
this (rare, yet not impossible) sequence of events, it looks like R
attempts to resolve the '.__C__<package>' symbol in the wrong
environment, and so class information lookup fails, and we end up
caching the wrong inheritance information.

Thanks,
Kevin
On Sun, Jul 31, 2016 at 5:12 AM, John Chambers <jmc at r-project.org> wrote:
#
Agreed that this looks like a real bug, and is independent of how one regards the more general issue about specifying methods for a public generic and a non-exported class.

John
On Aug 2, 2016, at 11:48 AM, Kevin Ushey <kevinushey at gmail.com> wrote: