Skip to content

no error trap for mismatched types #182

Description

@paciorek

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions