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

Allow record's parameter_list to be empty. #3900

Merged
merged 4 commits into from
Sep 18, 2020
Merged
Changes from all commits
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
3 changes: 1 addition & 2 deletions proposals/csharp-9.0/records.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ record_body
Record types are reference types, similar to a class declaration. It is an error for a record to provide
a `record_base` `argument_list` if the `record_declaration` does not contain a `parameter_list`.
At most one partial type declaration of a partial record may provide a `parameter_list`.
It is an error for a `parameter_list` to be empty.

Record parameters cannot use `ref`, `out` or `this` modifiers (but `in` and `params` are allowed).

Expand Down Expand Up @@ -385,7 +384,7 @@ For a record:

### Deconstruct

A positional record synthesizes a public void-returning instance method called Deconstruct with an out
A positional record with at least one parameter synthesizes a public void-returning instance method called Deconstruct with an out
parameter declaration for each parameter of the primary constructor declaration. Each parameter
of the Deconstruct method has the same type as the corresponding parameter of the primary
constructor declaration. The body of the method assigns each parameter of the Deconstruct method
Expand Down