Skip to content

Commit aaac6de

Browse files
committed
doc: baremodule: more accurate include example
In the example code: * show the two-argument method, too * show the dispatch constraint on the path argument of `include`, xref JuliaLang#55466
1 parent 060035d commit aaac6de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/docs/basedocs.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ baremodule Mod
187187
using Base
188188
189189
eval(x) = Core.eval(Mod, x)
190-
include(p) = Base.include(Mod, p)
190+
include(p::AbstractString) = Base.include(Mod, p)
191+
include(f::Function, p::AbstractString) = Base.include(f, Mod, p)
191192
192193
...
193194

0 commit comments

Comments
 (0)