Skip to content

Adding a keyword argument to a call can make a splatted default argument disappear #41416

@KristofferC

Description

@KristofferC

On 1.7 and 1.6.2 backport branch:

julia> f(a...="a"; b=true) = a
f (generic function with 2 methods)

julia> f() # ok
("a",)

julia> f(;b=false) # wut?
()

On 1.6.1:

julia> f(a...="a"; b=true) = a
f (generic function with 2 methods)

julia> f() # ok
("a",)

julia> f(;b=false) # ok
("a",)

Reduced from this PkgEval error: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/4dd3346_vs_dd12291/Publish.1.6.2-pre-40f17341a28.log.
Since this is also present in the backport branch the culprit is likely to be among https://github.com/JuliaLang/julia/pull/40702/commits.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions