Skip to content

Commit

Permalink
News and compat annotation for #29316
Browse files Browse the repository at this point in the history
(at-kwdef for parametric structs, and structs with supertypes).
  • Loading branch information
fredrikekre committed Dec 4, 2018
1 parent 28cf5fa commit 16ccdcc
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 @@ -70,6 +70,7 @@ Standard library changes
* `mul!`, `rmul!` and `lmul!` methods for `UniformScaling` ([#29506]).
* `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]).

Compiler/Runtime improvements
-----------------------------
Expand Down
4 changes: 4 additions & 0 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,10 @@ Inner constructors can still be defined, but at least one should accept argument
same form as the default inner constructor (i.e. one positional argument per field) in
order to function correctly with the keyword outer constructor.
!!! compat "Julia 1.1"
`Base.@kwdef` for parametric structs, and structs with supertypes
requires at least Julia 1.1.
# Examples
```jldoctest
julia> Base.@kwdef struct Foo
Expand Down

0 comments on commit 16ccdcc

Please sign in to comment.