Skip to content

Commit fc68378

Browse files
authored
Improve inference for LineInfoNodes (#73)
This and related PRs are intended to avoid warnings that would have otherwise occurred when running Julia PR37193 as test-revise.
1 parent 9f0e53b commit fc68378

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CodeTracking.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ function whereis(lineinfo, method::Method)
110110
end
111111
function whereis(lineinfo::Core.LineInfoNode, method::Method)
112112
# With LineInfoNode we have certainty about whether we're in a macro expansion
113-
if lineinfo.method == Symbol("macro expansion")
113+
meth = lineinfo.method
114+
if isa(meth, WeakRef)
115+
meth = meth.value
116+
end
117+
if meth === Symbol("macro expansion")
114118
return maybe_fix_path(String(lineinfo.file)), lineinfo.line
115119
end
116120
file, line1 = whereis(method)

0 commit comments

Comments
 (0)