-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Description
I could be missing something, but this seems bad to me:
julia> function track()
@eval function Base.getindex(A::Array{Int}, i1::Int)
println("A")
invoke(getindex, Tuple{Array, Int}, A, i1)
end
end
track (generic function with 1 method)
julia> function cleanup()
Base.delete_method(which(getindex, Tuple{Array{Int},Int}))
end
cleanup (generic function with 1 method)
julia> [1,7,3][2]
7
julia> track()
julia> [1,7,3][2]
A
7
julia> cleanup()
julia> [1,7,3][2]
7
julia> track()
julia> [1,7,3][2]
7I would expect to be able to resume tracking again after cleanup. I.e. the final output should also include "A". Replacing getindex with sin does not reproduce this issue.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version