Skip to content

Subtyping bug for complicated type alias #13165

Closed
@andreasnoack

Description

We use a slightly complicated type alias in the linear algebra code and it appears the <: is getting the ralation wrong for complex matrices.

julia> LinAlg.RealHermSymComplexHerm
Union{Hermitian{Complex{T<:Real},S},Hermitian{T<:Real,S},Symmetric{T<:Real,S}}

julia> Symmetric{Float64,Matrix{Float64}} <: LinAlg.RealHermSymComplexHerm
true

julia> Hermitian{Float64,Matrix{Float64}} <: LinAlg.RealHermSymComplexHerm
true

julia> Hermitian{Complex{Float64},Matrix{Complex{Float64}}} <: LinAlg.RealHermSymComplexHerm
false

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

    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