Skip to content

Commit 4ff5ae8

Browse files
committed
more update
1 parent 56a6f75 commit 4ff5ae8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/signatures.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function identify_framemethod_calls(frame)
143143
if length(tsrc.code) == 1
144144
tstmt = tsrc.code[1]
145145
if is_return(tstmt)
146-
tex = JuliaInterpreter.get_return_node(tstmt)
146+
tex = tstmt.val
147147
if isa(tex, Expr)
148148
if tex.head === :method && (methname = tex.args[1]; isa(methname, Symbol))
149149
push!(refs, methname=>i)
@@ -165,8 +165,13 @@ function identify_framemethod_calls(frame)
165165
key = stmt.args[1]
166166
key = normalize_defsig(key, frame)
167167
if key isa Symbol
168-
mi = methodinfos[key]
169-
mi.stop = i
168+
if (isdefined(moduleof(frame), key) &&
169+
getfield(moduleof(frame), key) isa Core.MethodTable)
170+
# accept it
171+
else
172+
mi = methodinfos[key]
173+
mi.stop = i
174+
end
170175
elseif key isa Expr # this is a module-scoped call. We don't have to worry about these because they are named
171176
continue
172177
end

0 commit comments

Comments
 (0)