Skip to content

Clarify that a copy constructor doesn't prevent an automatic addition of a default instance constructor for a record.#3913

Merged
AlekseyTs merged 4 commits intodotnet:masterfrom
AlekseyTs:Records
Sep 21, 2020
Merged

Clarify that a copy constructor doesn't prevent an automatic addition of a default instance constructor for a record.#3913
AlekseyTs merged 4 commits intodotnet:masterfrom
AlekseyTs:Records

Conversation

@AlekseyTs
Copy link
Contributor

No description provided.

AlekseyTs added 4 commits June 8, 2020 13:39
Merge from dotnet/csharplang
Merge from dotnet/csharplang
Merge from dotnet/csharplang
… of a default instance constructor for a record.
fields implicitly or explicitly declared within the record type.
fields implicitly or explicitly declared within the record type.
The sole presence of a copy constructor, whether explicit or implicit, doesn't prevent an automatic
addition of a default instance constructor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a "default instance constructor" similar to what is synthesized for an empty class declaration class C { }?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a "default instance constructor" similar to what is synthesized for an empty class declaration class C { }?

It isn't similar, it is what is synthesized for an empty class declaration.

AlekseyTs added a commit to dotnet/roslyn that referenced this pull request Sep 21, 2020
@AlekseyTs AlekseyTs merged commit d6109bf into dotnet:master Sep 21, 2020
@AlekseyTs AlekseyTs deleted the Records branch September 21, 2020 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants