Just came across this. It results in a C++ compilation error.
Not urgent.
rNL <- nList(integerVector) # note integer
cl <- nClass(
Cpublic =list(
x = 'rNL',
myfun = nFunction(
function(y = 'numericScalar') {
return(y*x[[2]])
}, returnType = 'numericVector' # note numeric
),
pop = nFunction(
function(x1 = 'numericVector', x2='numericVector') {
length(x) <- 3
x[[1]] <- x1 # this is still `1` as index in C++
x[[2]] <- x2
})
))
ccl <- nCompile(cl, rNL=rNL)
Just came across this. It results in a C++ compilation error.
Not urgent.