Cross-referencing a function from a submodule defined later

Fully qualifying the binding as A.C.foo should work:

module A

"""
[`foo`](@ref A.C.foo)
"""
module B
# need to import A to get around the problem of C not being defined
using ..A

"""
[`foo`](@ref A.C.foo)
"""
function bar end

end


module C
""" foo """
function foo end
end
end
2 Likes