Skip to content

Commit

Permalink
fix #16501, stacktraces test with inlining disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed May 27, 2016
1 parent 9201324 commit 6aaf0d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/stacktraces.jl
Original file line number Diff line number Diff line change
@@ -87,7 +87,8 @@ using Base.Test
@inline h(x) = (y = g(x); y) # this test could be extended to check for that if we switch to linear representation
f(x) = (y = h(x); y)
trace = (try; f(3); catch; catch_stacktrace(); end)[1:3]
for (frame, func, inlined) in zip(trace, [g,h,f], (true, true, false))
can_inline = Bool(Base.JLOptions().can_inline)
for (frame, func, inlined) in zip(trace, [g,h,f], (can_inline, can_inline, false))
@test frame.func === typeof(func).name.mt.name
#@test get(frame.linfo).def === which(func, (Any,)).func
#@test get(frame.linfo).specTypes === Tuple{typeof(func), Int}

0 comments on commit 6aaf0d3

Please sign in to comment.