Skip to content

Bug in subtyping resolution #47654

Closed
Closed
@olynch

Description

@olynch

This bug is succinctly described by the following code:

const NullableVec{T} = Union{AbstractVector{T}, AbstractVector{Union{T,Nothing}}}

struct NullableVecWrapper{T, V<:NullableVec{T}}
  v::V
end

abstract type P{A} end

NV = NullableVecWrapper{P, Vector{Union{P,Nothing}}}

NV <: NullableVecWrapper
> false

My julia version is 1.8.3, and I installed it through nix: https://github.com/olynch/scientific-fhs. Julia 1.7 and 1.6 do not have this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionRegression in behavior compared to a previous versiontypes 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