Skip to content

Commit

Permalink
fix #18173, closure lowering error caused by #18130
Browse files Browse the repository at this point in the history
(cherry picked from commit ca5973a)
ref #18183
  • Loading branch information
JeffBezanson authored and tkelman committed Aug 22, 2016
1 parent fe17200 commit e5b8332
Show file tree
Hide file tree
Showing 2 changed files with 8 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 @@ -2714,7 +2714,7 @@ f(x) = yt(x)
((eq? (car ex) 'method)
(and (length> ex 2)
(assq v (cadr (lam:vinfo (cadddr ex))))))
(else #f)))
(else (expr-contains-eq v ex))))
(assert (eq? (car lam) 'lambda))
(let ((vi (car (lam:vinfo lam))))
(if (and (any vinfo:capt vi)
Expand Down
7 changes: 7 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4484,3 +4484,10 @@ for (f,g) in ((:asin,:sin), (:acos,:cos))
f18085(::Type{Val{f}},x...) = map(x->2gx(x), f18085(Val{g},x...))
end
@test f18085(Val{:asin},3) === (0.0,)

# issue #18173
function f18173()
identity(()->successflag)
successflag = false
end
@test f18173() == false

0 comments on commit e5b8332

Please sign in to comment.