Skip to content

Commit

Permalink
Merge pull request JuliaLang#23496 from JuliaLang/jq/refl
Browse files Browse the repository at this point in the history
Add missing datatype_module method for UnionAll types
  • Loading branch information
quinnj committed Sep 5, 2017
2 parents ff59aad + 3f91250 commit 10ae1b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ datatype_name(t::UnionAll) = datatype_name(unwrap_unionall(t))
"""
Base.datatype_module(t::DataType) -> Module
Determine the module containing the definition of a `DataType`.
Determine the module containing the definition of a (potentially UnionAll-wrapped) `DataType`.
# Examples
```jldoctest
Expand All @@ -184,6 +184,7 @@ Foo
```
"""
datatype_module(t::DataType) = t.name.module
datatype_module(t::UnionAll) = datatype_module(unwrap_unionall(t))

"""
isconst(m::Module, s::Symbol) -> Bool
Expand Down

0 comments on commit 10ae1b9

Please sign in to comment.