Skip to content

Some concrete types are not properly interned #31696

@Keno

Description

@Keno

Internally in the system, we rely on the fact that concrete types are comparable by pointers. However, it is possible to create type signatures that are == to concrete types, but are not normalized to the corresponding type, causing all sorts of problems. Example:

julia> f(x::Int8, y::Int8) = 1
f (generic function with 1 method)

julia> f(x::T, y::T) where {T <: Int8} = 2
julia-debug: /home/keno/julia-comparison/src/gf.c:1105: check_ambiguous_visitor: Assertion `closure->after' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    equalityIssues relating to equality relations: ==, ===, isequalexistential crisistypes 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