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
4 changes: 4 additions & 0 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ function is_func_expr(@nospecialize(ex), meth::Method)
fname = fname.args[end]
modified = true
end
if isexpr(fname, :where)
fname = fname.args[1]
modified = true
end
end
if !(isa(fname, Symbol) && is_gensym(fname)) && !isexpr(fname, :$)
if fname === :Type && isexpr(ex.args[1], :where) && isexpr(callex.args[1], :(::)) && isexpr(callex.args[1].args[end], :curly)
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ isdefined(Main, :Revise) ? Main.Revise.includet("script.jl") : include("script.j
CodeTracking.invoked_setindex!(d, sin, "sin")
@test CodeTracking.invoked_get!(Vector{Function}, d, :cos) isa Vector{Function}

# Issue 115, Cthulhu issue 404
m = @which (Vector)(Int[])
src, line = definition(String, m)
@test occursin("(Array{T,N} where T)(x::AbstractArray{S,N}) where {S,N}", src)
@test line == m.line

# Issue 115, Cthulhu issue 474
m = @which NamedTuple{(),Tuple{}}(())
src, line = definition(String, m)
Expand Down