If one accidentally has myfun <- nFunction(, in defining the first method in, say, Cpublic, there is a semi-helpful R6 message:
Error in R6::R6Class(classname = "nClass_6_Cpub_uncompiled", public = c(Cpublic, :
All elements of public, private, and active must be named.
But if done in a later method:
> nc <- nClass(
Cpublic = list(
fun0 = nFunction(
fun = function(x = 'numericVector',y='numericScalar') {
return(x*y)
}, returnType = 'numericVector'),
fun1 <- nFunction(
fun = function(x = 'numericVector',y='numericScalar') {
return(x*y)
}, returnType = 'numericVector')
))
Error in NF@internals :
no applicable method for `@` applied to an object of class "NULL"
We should probably trap this better.
If one accidentally has
myfun <- nFunction(, in defining the first method in, say, Cpublic, there is a semi-helpful R6 message:But if done in a later method:
We should probably trap this better.