Delete a Method in Julia
There is a type Method
. Instances of that type refer to a specific method of a particular function.
particular_method = @which foo(2)
foo(a::Integer) in Main at /home/js/Documents/Julia/Matching/Query_Creation.jl:75
typeof(particular_method)
Method
And here's a way to delete the method using such an object:
Base.delete_method(particular_method)
foo(2)
ERROR: MethodError: no method matching foo(::Int64)