Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

at-kwdef support for parametric types and subtypes #29316

Merged
merged 4 commits into from
Oct 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update docs
  • Loading branch information
simonbyrne committed Sep 30, 2018
commit 8965f08e177945faa7449b974046cef97e5d98fd
4 changes: 4 additions & 0 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,10 @@ expression. The default argument is supplied by declaring fields of the form `fi
default` or `field = default`. If no default is provided then the keyword argument becomes
a required keyword argument in the resulting type constructor.

Inner constructors can still be defined, but at least one should accept arguments in the
same form as the default inner constructor (i.e. one positional argument per field) in
order to function correctly with the keyword outer constructor.

# Examples
```jldoctest
julia> Base.@kwdef struct Foo
Expand Down