Skip to content

Splatted keywords take precedence #17785

Description

@omus

When combining specified keywords and splatted keywords the splatted keywords are always used. Similar to #16937.

julia> g(; a=1, b=2) = a, b
g (generic function with 1 method)

julia> opts = (:a => 3, :b => 4)
(:a=>3,:b=>4)

julia> g(; opts...)
(3,4)

julia> g(; a=5, opts...)
(3,4)

julia> g(; opts..., a=5)
(3,4)

julia> g(; a=5)
(5,2)

Occurs in both 0.4.6 and 0.5.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions