Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #35201, syntax error with named splatting inside function call #35202

Merged
merged 1 commit into from
Mar 23, 2020
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: 2 additions & 0 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,8 @@
`(,(car x) ,(arg-to-temp (cadr x))))
((or (eq? (car x) 'kw) (and tup (eq? (car x) '=)))
`(,(car x) ,(cadr x) ,(arg-to-temp (caddr x))))
((eq? (car x) 'parameters)
`(parameters ,@(map arg-to-temp (cdr x))))
((eq? (car x) 'tuple)
(let ((tmp (remove-argument-side-effects x #t)))
(set! a (revappend (cdr tmp) a))
Expand Down
5 changes: 5 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2213,3 +2213,8 @@ end
Expr(:error, "invisible character \\u200b near column 3")
@test Meta.parse("aa\UE0080", raise=false) ==
Expr(:error, "invalid character \"\Ue0080\" near column 3")

# issue #35201
h35201(x; k=1) = (x, k)
f35201(c) = h35201((;c...), k=true)
@test f35201(Dict(:a=>1,:b=>3)) === ((a=1,b=3), true)