Skip to content

Commit

Permalink
fix JuliaLang#4771, missing case for -> in macroexpander
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Nov 10, 2013
1 parent 5e2cb42 commit fc174d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,7 @@ So far only the second case can actually occur.
'()
(case (car e)
((escape) '())
((= function)
((= function ->)
(append! (filter
symbol?
(if (and (pair? (cadr e)) (eq? (car (cadr e)) 'tuple))
Expand Down
11 changes: 11 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1126,3 +1126,14 @@ f4675{T}(x::StridedArray{T}...) = 2
g4675{T}(x::StridedArray{T}...) = 2
g4675(x::StridedArray...) = 1
@test g4675(zeros(50,50), zeros(50,50)) == 2

# issue #4771
module Lib4771
export @make_closure
macro make_closure()
quote
f = (x)->1
end
end
end # module
@test (Lib4771.@make_closure)(0) == 1

0 comments on commit fc174d3

Please sign in to comment.