-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
The following snippet of code fails:
library(R6)
Base <- R6Class(
"Base",
public = list(
initialize = function() {
self[["Hello"]] <- 1
}
),
lock_objects = FALSE
)
Base$new() # okay
Derived <- R6Class("Derived", inherit = Base)
Derived$new() # barfThe error:
> Derived$new()
Error in self[["Hello"]] <- 1 :
cannot add bindings to a locked environment
Should derived classes also inherit the lockedness from their parent environment?
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement