File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ Library changes
8787* ` @time ` now separates out % time spent recompiling invalidated methods ([ #45015 ] ).
8888* ` eachslice ` now works over multiple dimensions; ` eachslice ` , ` eachrow ` and ` eachcol ` return
8989 a ` Slices ` object, which allows dispatching to provide more efficient methods ([ #32310 ] ).
90+ * ` @kwdef ` is now exported and added to the public API ([ #46273 ] )
9091
9192Standard library changes
9293------------------------
Original file line number Diff line number Diff line change @@ -772,6 +772,7 @@ export
772772# syntax
773773 esc,
774774 gensym,
775+ @kwdef ,
775776 macroexpand,
776777 @macroexpand1 ,
777778 @macroexpand ,
Original file line number Diff line number Diff line change @@ -507,9 +507,12 @@ order to function correctly with the keyword outer constructor.
507507 `Base.@kwdef` for parametric structs, and structs with supertypes
508508 requires at least Julia 1.1.
509509
510+ !!! compat "Julia 1.9"
511+ This macro is exported as of Julia 1.9.
512+
510513# Examples
511514```jldoctest
512- julia> Base. @kwdef struct Foo
515+ julia> @kwdef struct Foo
513516 a::Int = 1 # specified default
514517 b::String # required keyword
515518 end
Original file line number Diff line number Diff line change 8888const
8989struct
9090mutable struct
91+ @kwdef
9192abstract type
9293primitive type
9394where
You can’t perform that action at this time.
0 commit comments