Skip to content

Redefining the same type does not work if fields have UnionAll types #20999

@simonster

Description

@simonster

I'm not 100% sure this is "officially supported" but I've been led to believe it's supposed to work:

julia> struct X
           x::Array{T} where T<:Real
       end

julia> struct X
           x::Array{T} where T<:Real
       end
ERROR: invalid redefinition of constant X

Tested with 3777aab

Metadata

Metadata

Assignees

Labels

types and dispatchTypes, subtyping and method dispatch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions