Thanks. Do you know if this is documented (ie something that users can rely on), or an accidental implementation feature? I could not find it in the docs.
Adds docstring "..." to the ModuleM. Adding the docstring above the Module is the preferred syntax, however both are equivalent.
The docstring definitely belongs to the scope of the documented module in the 2nd example, and that must also be the case in the 1st example for equivalence. None of the sections for other scope-introducing blocks share this pattern.
A minimal base Julia-only example:
julia> module A
x = "a"
"$x"
module B
x = "b"
end
end
Main.A
julia> @doc A.B
b