Skip to content

Commit

Permalink
improve check on r6 cloneable
Browse files Browse the repository at this point in the history
  • Loading branch information
mllg committed Oct 18, 2017
1 parent f95875b commit fdc4fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/checkR6.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ checkR6Props = function(x, cloneable = NULL, public = NULL, private = NULL) {
if (!is.null(cloneable)) {
qassert(cloneable, "B1")
if (cloneable) {
if (is.null(x$clone))
if (!exists("clone", envir = x))
return("Must be cloneable")
} else {
if (!is.null(x$clone))
if (exists("clone", envir = x))
return("May not be cloneable")
}
}
Expand Down

0 comments on commit fdc4fd3

Please sign in to comment.