CodeTracking.jl
CodeTracking.jl copied to clipboard
Does not handle anonymous functions defined within other functions
See title. When trying to get the definition of such a function (e. g. the return value of get_anon() = x -> x^3 + 777
), there is a warning and the result is nothing
.
File tmp.jl
:
get_anon() = x -> x^3 + 777
anon = get_anon()
REPL:
julia> using Revise
julia> using CodeTracking
julia> includet("tmp.jl")
julia> @code_expr anon(10)
┌ Warning: Tuple{var"#1#2", Any} was not found
└ @ Revise ~/.julia/packages/Revise/uvGMC/src/packagedef.jl:1112
julia> definition(Expr, which(anon, Base.typesof(10)))
┌ Warning: Tuple{var"#1#2", Any} was not found
└ @ Revise ~/.julia/packages/Revise/uvGMC/src/packagedef.jl:1112