Skip to content

Error when exporting generic overload of operator (e.g. "==") #43

@NilsRodrigues

Description

@NilsRodrigues

As of version v0.10.1 there is code to handle exports with special characters #37 and spaces #39.
The codes adds quotes `` to escape these names of exports.

However, when trying to export overloads of generic functions (e.g. ==.foo, !=.foo) for S3 classes, there are no quotes and the export fails.
Is it possible to fix the export in order to handle such overloads for S3 classes?

Is there a reason why not all names are quoted to allow any arbitrary characters? There is a comment in the corresponding line of source code in the modules package that says "Exclude Linting"...

Code to reproduce error:
modules::module({"==.foo" <- function(left, right) {return(left, right)}})

Thank you for your time and effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions