Skip to content

HModuleElt constructor relies on Pair's questionable promotion behavior #2

Open
@adienes

Description

@adienes

in JuliaLang/julia#58836, triage desires to remove the promote_rule defined for Pair (and Some) as to make it consistent with every other container type in the language

I am going through the results of the Nanosoldier run so as to avoid as much potential downstream impact as possible.

I noticed that the line here

function HModuleElt(x::Vector{Pair{K,V}};check=true) where{K,V}
relies on Base.vect to call promote_typeof on the Pairs, promoting them to a common concrete K, V

would it be feasible to loosen that signature? I believe the Dict constructor should be trying to handle promotion and {K,V} type anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions