Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function isfuncexpr(ex)
# Strip any macros that wrap the method definition
while isexpr(ex, :macrocall)
while isexpr(ex, :macrocall) && length(ex.args) == 3
ex = ex.args[3]
end
isa(ex, Expr) || return false
Expand Down
13 changes: 13 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,16 @@ l = @__LINE__
@test line == l - 3
@test def == "(d_34)(x::T, y::T) where {T<:Number} = x === y"
end

function g()
Base.@_inline_meta
print("hello")
end
@testset "inline macros" begin
def, line = CodeTracking.definition(String, @which g())
@test def == """
function g()
Base.@_inline_meta
print("hello")
end"""
end