From 34a27cfee740706244e9df44fd40411e21451cb9 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 01:56:12 +0100 Subject: [PATCH] News and compat annotation for #29600 (fieldtypes). --- NEWS.md | 1 + base/reflection.jl | 3 +++ 2 files changed, 4 insertions(+) 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