Skip to content

Commit

Permalink
News and compat annotation for #29259
Browse files Browse the repository at this point in the history
(merge(::NamedTuple...) with more than 2 arguments).
  • Loading branch information
fredrikekre committed Dec 4, 2018
1 parent 16ccdcc commit 120df07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------
Expand Down
4 changes: 4 additions & 0 deletions base/namedtuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 120df07

Please sign in to comment.