Skip to content

Commit 0f7bbfb

Browse files
committed
News and compat annotation for #29316
(at-kwdef for parametric structs, and structs with supertypes).
1 parent 0f0a600 commit 0f7bbfb

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
@@ -68,6 +68,7 @@ Standard library changes
6868
* `mul!`, `rmul!` and `lmul!` methods for `UniformScaling` ([#29506]).
6969
* `Symmetric` and `Hermitian` matrices now preserve the wrapper when scaled with a number ([#29469]).
7070
* New `edit(m::Module)` method which opens the main source file for module `m` ([#29636]).
71+
* `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]).
7172

7273
Compiler/Runtime improvements
7374
-----------------------------

base/util.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ Inner constructors can still be defined, but at least one should accept argument
651651
same form as the default inner constructor (i.e. one positional argument per field) in
652652
order to function correctly with the keyword outer constructor.
653653
654+
!!! compat "Julia 1.1"
655+
`Base.@kwdef` for parametric structs, and structs with supertypes
656+
requires at least Julia 1.1.
657+
654658
# Examples
655659
```jldoctest
656660
julia> Base.@kwdef struct Foo

0 commit comments

Comments
 (0)