Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
name positional-sparams
`((|::|
;; if there are optional positional args, we need to be able to reference the function name
,(if (any kwarg? pargl) (gensy) UNUSED)
,(if (any kwarg? `(,@pargl ,@vararg)) (gensy) UNUSED)
(call (core kwftype) ,ftype)) ,kwdecl ,@pargl ,@vararg)
`(block
;; propagate method metadata to keyword sorter
Expand Down
6 changes: 6 additions & 0 deletions test/keywordargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,3 +394,9 @@ let m = first(methods(Core.kwcall, (NamedTuple,typeof(kwf1),Vararg)))
@test Core.kwcall(1) == "hi 1"
@test which(Core.kwcall, (Int,)).name === :kwcall
end

# issue #50518
function f50518(xs...=["a", "b", "c"]...; debug=false)
return xs[1]
end
@test f50518() == f50518(;debug=false) == "a"