I tried something like this:
A = baremodule AA
abstract type Foo end
(::Type{Foo})(x,y) = 5
#make sure a methodinstance exists
bar = Foo(1,2)
end
A=[]
It complains that module is not top level … meaning that Modules are treated differently , and probably are considered constant and their lifetime is considered infinite once they are loaded.
So it would be impossible to safely remove a type from the type tree and consequently impossible to
delete methods…
Is this correct?