Skip to content

@eval into a module breaks subtyping relationships #50354

Open
@Seelengrab

Description

See also JuliaDocs/Documenter.jl#2160

julia> const m = Module()
Main.anonymous

julia> @eval m begin
           abstract type Foo end
           struct Bar <: Foo end
       end

julia> supertype(m.Bar) === m.Foo
true

julia> subtypes(m.Foo)
Any[]

subtypes should obviously contain m.Bar as well. Whether the module is anonymous or not doesn't matter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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