Skip to content

warning when returning a 'string' #201

@paciorek

Description

@paciorek

There's some issue with the returnType here. The code runs but emits the warning below.

nc <- nClass(
    Cpublic = list(
        run = nFunction(
            fun=function(mystr = 'string'){
                return(mystr)
            }, returnType = 'string'
        )))
cnc <- nCompile(nc)
Warning message:
Scalar type (string) for return() does not perfectly match the nFunction's return type (string).
 This occurred for: return(mystr)
 This was part of the call:  {
    return(mystr)
} 

I haven't investigated but would be happy to look into this at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions