diff --git a/NEWS.md b/NEWS.md index 3feba1cb586e3..56c2fa69f260c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -34,6 +34,7 @@ New library functions * `splitpath(p::String)` function, which is the opposite of `joinpath(parts...)`: it splits a filepath into its components ([#28156]). * `isnothing(::Any)` function, to check whether something is a `Nothing`, returns a `Bool` ([#29679]). * `getpid(::Process)` method ([#24064]). + * `fieldtypes(T::Type)` which return the declared types of the field in type T ([#29600]). Standard library changes ------------------------ diff --git a/base/reflection.jl b/base/reflection.jl index 8d20f9b67a4f7..90540aafaa426 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -664,6 +664,9 @@ end The declared types of all fields in a composite DataType `T` as a tuple. +!!! compat "Julia 1.1" + This function requires at least Julia 1.1. + # Examples ```jldoctest julia> struct Foo