As I said in the linked discussion though, if you want to ignore those corner cases, you can write something like
function default(::Type{ft}) where {ft <: Function}
if isdefined(ft, :instance)
ft.instance
else
error("This type does not have a single instance")
end
end
which will work for most functions, but can definitely fail for the reasons I’ve described.