We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d15af5a commit d21c477Copy full SHA for d21c477
src/utils.jl
@@ -1,6 +1,6 @@
1
function isfuncexpr(ex)
2
# Strip any macros that wrap the method definition
3
- while isexpr(ex, :macrocall)
+ while isexpr(ex, :macrocall) && length(ex.args) == 3
4
ex = ex.args[3]
5
end
6
isa(ex, Expr) || return false
test/runtests.jl
@@ -128,3 +128,16 @@ l = @__LINE__
128
@test line == l - 3
129
@test def == "(d_34)(x::T, y::T) where {T<:Number} = x === y"
130
131
+
132
+function g()
133
+ Base.@_inline_meta
134
+ print("hello")
135
+end
136
+@testset "inline macros" begin
137
+ def, line = CodeTracking.definition(String, @which g())
138
+ @test def == """
139
+ function g()
140
141
142
+ end"""
143
0 commit comments