Skip to content

Commit 120df07

Browse files
committed
News and compat annotation for #29259
(merge(::NamedTuple...) with more than 2 arguments).
1 parent 16ccdcc commit 120df07

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Standard library changes
7171
* `Symmetric` and `Hermitian` matrices now preserve the wrapper when scaled with a number ([#29469]).
7272
* New `edit(m::Module)` method which opens the main source file for module `m` ([#29636]).
7373
* `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]).
74+
* `merge(::NamedTuple, ::NamedTuple...)` can now be used with more than 2 `NamedTuple`s ([#29259]).
7475

7576
Compiler/Runtime improvements
7677
-----------------------------

base/namedtuple.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ contains that field. Fields present in only the rightmost named tuple of a pair
223223
A fallback is implemented for when only a single named tuple is supplied,
224224
with signature `merge(a::NamedTuple)`.
225225
226+
!!! compat "Julia 1.1"
227+
Merging 3 or more `NamedTuple` requires at least Julia 1.1.
228+
229+
# Examples
226230
```jldoctest
227231
julia> merge((a=1, b=2, c=3), (b=4, d=5))
228232
(a = 1, b = 4, c = 3, d = 5)

0 commit comments

Comments
 (0)