diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm
index 4d0721876c8d31..0e74e5924d98f0 100644
--- a/src/julia-syntax.scm
+++ b/src/julia-syntax.scm
@@ -397,7 +397,8 @@
sparams))
(keyword-sparam-names
(map (lambda (s) (if (symbol? s) s (cadr s))) keyword-sparams)))
- (let ((kw (gensy)) (i (gensy)) (ii (gensy)) (elt (gensy)) (rkw (gensy))
+ (let ((kw (gensy)) (i (gensy)) (ii (gensy)) (elt (gensy))
+ (rkw (if (null? restkw) '() (symbol (string (car restkw) "..."))))
(mangled (symbol (string "#" (if name (undot-name name) 'call) "#"
(string (current-julia-module-counter)))))
(flags (map (lambda (x) (gensy)) vals)))
diff --git a/test/show.jl b/test/show.jl
index fd0ee68fc5fb59..9830b5cc841ca7 100644
--- a/test/show.jl
+++ b/test/show.jl
@@ -325,10 +325,10 @@ end
f5971(x, y...; z=1, w...) = nothing
let repr = sprint(io -> show(io,"text/plain", methods(f5971)))
- @test contains(repr, "f5971(x, y...; z)")
+ @test contains(repr, "f5971(x, y...; z, w...)")
end
let repr = sprint(io -> show(io,"text/html", methods(f5971)))
- @test contains(repr, "f5971(x, y...; z)")
+ @test contains(repr, "f5971(x, y...; z, w...)")
end
if isempty(Base.GIT_VERSION_INFO.commit)