You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## This works fine:`metadata7<-`<-R7::new_generic("metadata7", signature="x")
R7::method(`metadata7<-`, "Annotated7") <-function(x, ..., value) {
if (!is.list(value)) {
stop("replacement 'metadata' value must be a list")
}
if (!length(value)) {
names(value) <-NULL# instead of character()
}
x@metadata<-valuex
}
## This doesn't`metadata7<-`<-R7::new_generic("metadata7", signature= c("x", "...", "value"))
R7::method(`metadata7<-`, "Annotated7") <-function(x, ..., value) {
if (!is.list(value)) {
stop("replacement 'metadata' value must be a list")
}
if (!length(value)) {
names(value) <-NULL# instead of character()
}
x@metadata<-valuex
}
The text was updated successfully, but these errors were encountered:
`metadata7<-`<-R7::new_generic("metadata7", signature= c("x", "...", "value"))
R7::method(`metadata7<-`, "Annotated7") <-function(x, ..., value) {
if (!is.list(value)) {
stop("replacement 'metadata' value must be a list")
}
if (!length(value)) {
names(value) <-NULL# instead of character()
}
x@metadata<-valuex
}
Reproducible example:
The text was updated successfully, but these errors were encountered: