Skip to content

datatype cache normalization bugs #35130

@vtjnash

Description

@vtjnash

These types should print the same (since the type parameters are type-equal), if the datatype cache (and new hash computation) is working correctly:

julia> Val{Tuple{Any}}
Val{Tuple{Any}}

julia> Val{Tuple{T} where T}
Val{Tuple{T} where T}
julia> Val{Tuple{Float64,Int64,Int64}}
Val{Tuple{Float64,Int64,Int64}}

julia> Val{Tuple{Float64,Vararg{T,2}} where T<:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T<:Int64}

julia> Val{Tuple{Float64,T,T} where T<:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T<:Int64}

This is actually an improvement from before the new hash computation code (the last one was previously also creating a unique type). Found these by some quick fuzzing, so I'm pleased to see there weren't more!

Metadata

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