diff --git a/NEWS.md b/NEWS.md index 5aa9d94706d4a..54f48ccb51347 100644 --- a/NEWS.md +++ b/NEWS.md @@ -71,6 +71,7 @@ Standard library changes * `Symmetric` and `Hermitian` matrices now preserve the wrapper when scaled with a number ([#29469]). * New `edit(m::Module)` method which opens the main source file for module `m` ([#29636]). * `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]). + * `merge(::NamedTuple, ::NamedTuple...)` can now be used with more than 2 `NamedTuple`s ([#29259]). Compiler/Runtime improvements ----------------------------- diff --git a/base/namedtuple.jl b/base/namedtuple.jl index 8b0d777feab81..66f5a18774b27 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -223,6 +223,10 @@ contains that field. Fields present in only the rightmost named tuple of a pair A fallback is implemented for when only a single named tuple is supplied, with signature `merge(a::NamedTuple)`. +!!! compat "Julia 1.1" + Merging 3 or more `NamedTuple` requires at least Julia 1.1. + +# Examples ```jldoctest julia> merge((a=1, b=2, c=3), (b=4, d=5)) (a = 1, b = 4, c = 3, d = 5)