-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Description
I have prepared a MRE for this issue, as a dummy package that can be installed and tested quickly.
In summary, I need to register some S3 classes with inheritance structure using setOldClass().
#' @importFrom methods setOldClass
methods::setOldClass(c('derived_class', 'my_class'))When I load_all() for the first time, everything goes fine. But for successive times, it fails as follows:
Loading testpkg
Error in methods::setOldClass(c("derived_class", "my_class")) (from testmethod.R#3) :
inconsistent old-style class information for “derived_class”; the class is defined but does not extend “my_class” and is not valid as the data part
Variations:
- The error does not occur if the class to be registered is single (i.e.
setOldClass('my_class')). - Incomprehensibly, it does not occur either if the derived class name is
'splines'(!?!?) - Finally, the error still occurs if I register
'my_class'beforehand in a separate sentence.
> session_info()
Session info ---------------------------------------------------------------------------------------------------------------
setting value
version R version 3.2.0 (2015-04-16)
system x86_64, linux-gnu
ui RStudio (0.99.441)
language (EN)
collate en_US.UTF-8
tz <NA>
Packages -------------------------------------------------------------------------------------------------------------------
package * version date source
devtools 1.7.0 2015-01-17 CRAN (R 3.1.2)
digest * 0.6.8 2014-12-31 CRAN (R 3.2.0)
memoise * 0.2.1 2014-04-22 CRAN (R 3.1.2)
Rcpp * 0.11.5 2015-03-06 CRAN (R 3.1.3)
roxygen2 * 4.1.1 2015-04-15 CRAN (R 3.2.0)
rstudioapi * 0.3.1 2015-04-07 CRAN (R 3.2.0)
stringr * 0.6.2 2012-12-06 CRAN (R 3.1.2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels