Skip to content

untrapped C++ compilation error when DSL function is missing args #149

@paciorek

Description

@paciorek

I suspect this might be a general issue.

    go = nFunction(
        fun = function() {
            y <- rbeta(2,1)  # 3rd argument is missing
          return(y)
        },
        returnType = 'numericVector'
      )
cgo <- nCompile(go)
/accounts/vis/paciorek/R/x86_64-pc-linux-gnu-library-ubuntu-24.04/4.5/nCompiler/include/nCompiler/ET_ext/post_Rcpp/recyclingRule.h:642:20: error: too few arguments to function
  642 |         return func(
      |                ~~~~^
  643 |           std::get<Indexes>(t).coeff(index % sizes[Indexes])...
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  644 |         );
      |         ~           

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