Skip to content

Commit

Permalink
error for macro definitions trying to accept keyword args
Browse files Browse the repository at this point in the history
fixes #15896
  • Loading branch information
JeffBezanson committed Apr 17, 2016
1 parent bbe103d commit 16475ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,9 @@
(cond ((and (pair? (cadr e))
(eq? (car (cadr e)) 'call)
(symbol? (cadr (cadr e))))
(let ((anames (cddr (cadr e))))
(let ((anames (remove-empty-parameters (cddr (cadr e)))))
(if (has-parameters? anames)
(error "macros cannot accept keyword arguments"))
(expand-forms
`(function (call ,(symbol (string #\@ (cadr (cadr e))))
,@(map (lambda (v)
Expand Down

0 comments on commit 16475ea

Please sign in to comment.