Skip to content

Commit

Permalink
Fix documenting bitstypes
Browse files Browse the repository at this point in the history
Documenting `bitstype`s that used `<:` syntax, ie.

    "..."
    bitstype 8 T <: S

was unsupported.

(cherry picked from commit 4d60ba6)
ref #13100
  • Loading branch information
MichaelHatherly authored and tkelman committed Sep 13, 2015
1 parent 08d9abb commit 0b1fc45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/docs/Docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ function docm(meta, def, define = true)
isexpr(def′, :type) ? typedoc(meta, def, def′) :
isexpr(def′, :macro) ? vardoc(meta, def, symbol('@',namify(def′))) :
isexpr(def′, :abstract) ? namedoc(meta, def, namify(def′)) :
isexpr(def′, :bitstype) ? namedoc(meta, def, def′.args[2]) :
isexpr(def′, :bitstype) ? namedoc(meta, def, namify(def′.args[2])) :
isexpr(def′, :typealias) ? vardoc(meta, def, namify(def′)) :
isexpr(def′, :module) ? moddoc(meta, def, def′.args[2]) :
isexpr(def′, :(=), :const,
Expand Down
5 changes: 5 additions & 0 deletions test/docs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ abstract AT
"BT"
bitstype 8 BT

"BT2"
bitstype 8 BT2 <: Integer

"T"
type T <: AT
"T.x"
Expand Down Expand Up @@ -174,6 +177,8 @@ let BT = DocsTest.BT
@test meta(DocsTest)[BT] == doc"BT"
end

@test meta(DocsTest)[DocsTest.BT2] == doc"BT2"

let T = DocsTest.T
typedoc = meta(DocsTest)[T]
@test docstrings_equal(typedoc.main, doc"T")
Expand Down

0 comments on commit 0b1fc45

Please sign in to comment.