Skip to content

propertynames and hasproperty wrong for modules #57609

Open
@aplavin

Description

@aplavin

For modules, hasproperty and propertynames are inconsistent with getproperty. The latter returns expected results, so presumably the former are incorrect?
MWE:

julia> baremodule MyMod
       f(x) = x
       end

# MyMod clearly has the f property:
julia> getproperty(MyMod, :f)
f (generic function with 1 method)

# but nether propertynames nor hasproperty report it:
julia> propertynames(MyMod)
1-element Vector{Symbol}:
 :MyMod

julia> propertynames(MyMod, true)
1-element Vector{Symbol}:
 :MyMod

julia> hasproperty(MyMod, :f)
false

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions