Skip to content

Wrong "Invalid redefinition of type" for certain UnionAll field types #770

@stev47

Description

@stev47

Minimal example:

using Revise

mktemp() do f, io
    write(io, """
        struct A{T} end
        struct B{T, S}
          a::A{<:T}
        end
        """)
    close(io)
    includet(f)
end

results in

ERROR: LoadError: invalid redefinition of type B

The above works (try in fresh session) if either:

  • A{<:T} is replaced with A{T},
  • S is removed, or
  • includet replaced by standard include

This breaks normal Revise workflow even if no types are changed at all.
#734 possibly related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugjuliabugBug is due to a julia bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions