Skip to content

Commit 9b2ae10

Browse files
committed
Fix some newly-detected ambiguities
1 parent 2f5f800 commit 9b2ae10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,19 @@ function firstline(ex::Expr)
310310
end
311311

312312
"""
313-
loc = whereis(frame, pc=frame.pc)
313+
loc = whereis(frame, pc::Int=frame.pc)
314314
315315
Return the file and line number for `frame` at `pc`. If this cannot be
316316
determined, `loc == nothing`. Otherwise `loc == (filepath, line)`.
317317
"""
318-
function CodeTracking.whereis(framecode::FrameCode, pc)
318+
function CodeTracking.whereis(framecode::FrameCode, pc::Int)
319319
codeloc = codelocation(framecode.src, pc)
320320
codeloc == 0 && return nothing
321321
lineinfo = linetable(framecode, codeloc)
322322
return isa(framecode.scope, Method) ?
323323
whereis(lineinfo, framecode.scope) : (getfile(lineinfo), getline(lineinfo))
324324
end
325-
CodeTracking.whereis(frame::Frame, pc=frame.pc) = whereis(frame.framecode, pc)
325+
CodeTracking.whereis(frame::Frame, pc::Int=frame.pc) = whereis(frame.framecode, pc)
326326

327327
"""
328328
line = linenumber(framecode, pc)
@@ -345,7 +345,7 @@ function getfile(framecode::FrameCode, pc)
345345
end
346346
getfile(frame::Frame, pc=frame.pc) = getfile(frame.framecode, pc)
347347

348-
function codelocation(code::CodeInfo, idx)
348+
function codelocation(code::CodeInfo, idx::Int)
349349
codeloc = codelocs(code)[idx]
350350
while codeloc == 0 && (code.code[idx] === nothing || isexpr(code.code[idx], :meta)) && idx < length(code.code)
351351
idx += 1

0 commit comments

Comments
 (0)