Skip to content

'record struct' constructor requires 'this' initializer that calls primary constructor or explicit constructor#5562

Merged
cston merged 2 commits intodotnet:mainfrom
cston:record-struct-initializer
Dec 28, 2021
Merged

'record struct' constructor requires 'this' initializer that calls primary constructor or explicit constructor#5562
cston merged 2 commits intodotnet:mainfrom
cston:record-struct-initializer

Conversation

@cston
Copy link
Copy Markdown
Contributor

@cston cston commented Dec 20, 2021

In a record struct with a primary constructor, explicit constructors require a this() initializer that invokes the primary constructor or another explicitly declared constructor.

@cston cston requested a review from a team as a code owner December 20, 2021 20:10
@cston cston merged commit ed06bed into dotnet:main Dec 28, 2021
@cston cston deleted the record-struct-initializer branch December 28, 2021 18:07
333fred added a commit to 333fred/csharplang that referenced this pull request Jan 4, 2022
…dates

* upstream/main:
  Add example of when field initializers will not be run for option 3.
  Correct link
  Added LDM notes for January 3rd, 2022.
  Update README.md
  Update LDM agenda
  Fix line wrapping (dotnet#5589)
  Update raw-string-literal.md
  'record struct' constructor requires 'this' initializer that calls primary constructor or explicit constructor (dotnet#5562)
  Tweak readonly backing field wording (dotnet#5583)
  Update semi auto props spec around readonly backing field for init-only (dotnet#5582)
  Spec change around backing field being readonly (dotnet#5575)
333fred added a commit to Youssef1313/csharplang that referenced this pull request Jan 12, 2022
* upstream/main:
  Update LDM agenda
  Added LDM Notes for January 5th, 2022.
  Update the required members spec (dotnet#5566)
  Add example of when field initializers will not be run for option 3.
  Correct link
  Added LDM notes for January 3rd, 2022.
  Update README.md
  Update LDM agenda
  Fix line wrapping (dotnet#5589)
  Update raw-string-literal.md
  'record struct' constructor requires 'this' initializer that calls primary constructor or explicit constructor (dotnet#5562)
  Tweak readonly backing field wording (dotnet#5583)
  Update semi auto props spec around readonly backing field for init-only (dotnet#5582)
  Spec change around backing field being readonly (dotnet#5575)
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.

3 participants