Skip to content

S3 methods in local environment are not identified #91

@mschubert

Description

@mschubert

Describe the bug

Originally mentioned in #2, identification of local S3 methods is mentioned to be fixed in 7847dd5 (2018).

#47 seems to be for S3 methods in packages specifically.

Related: mschubert/clustermq#256

Reproduce example

f = function(i) UseMethod('f')
f.numeric = function(i) sqrt(i)
globals::globalsOf({ f(1) }, locals=TRUE, recursive=TRUE) # addS3 is no longer documented
# list()

The originally included test also seems to fail now, although it is no longer available. I also no longer see any mention on S3 in the tests or any changes to S3 behavior in the NEWS.

Expected behavior

Shouldn't this identify f.numeric?

Session information

R version 4.3.2, globals_0.16.2

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