Skip to content

Commit

Permalink
recovert explict conversion to Int
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Dec 18, 2020
1 parent e56ed17 commit bdc133c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,11 @@ function lineoffset(framecode::FrameCode)
return offset
end

getline(ln::LineTypes) = ln.line::Int
getline(ln::Expr) = ln.args[1]::Int # assuming ln.head === :line
function getline(ln::Union{LineTypes,Expr})
_getline(ln::LineTypes) = ln.line
_getline(ln::Expr) = ln.args[1] # assuming ln.head === :line
return Int(_getline(ln))::Int
end
# work around compiler error on 1.2
@static if v"1.2.0" <= VERSION < v"1.3"
getfile(ln) = begin
Expand Down

0 comments on commit bdc133c

Please sign in to comment.