Skip to content

Base.merge gives incorrect results for Base.Pairs + NameTuple #59292

@topolarity

Description

@topolarity
julia> merge((; a = 1), Base.Pairs((; b = 2, c = 3), (:b,)))
(a = 1, b = 2, c = 3)

julia> merge((; a = 1), collect(Base.Pairs((; b = 2, c = 3), (:b,))))
(a = 1, b = 2)

Noticed in #59269 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcollectionsData structures holding multiple items, e.g. setscorrectness bug ⚠Bugs that are likely to lead to incorrect results in user code without throwing

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions