Skip to content

Let method<- register any method #455

@t-kalinowski

Description

@t-kalinowski

Currently, this raises an error:

library(S7)
an_s3_generic <- function(x) UseMethod("an_s3_generic")
method(an_s3_generic, S7::class_character) <- function(x) "foo"
#> Error: When registering methods for S3 generic an_s3_generic(), signature must be an S7 class, not a base type.

It would be nice if this worked and method<- was truly a single interface for registering any kind of method.

Metadata

Metadata

Assignees

No one assigned

    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