Skip to content

Does not handle anonymous functions defined within other functions #132

@Socob

Description

@Socob

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions