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

Add support for records #273

Closed
11 tasks done
Tracked by #9
adrianoc opened this issue Mar 25, 2024 · 0 comments
Closed
11 tasks done
Tracked by #9

Add support for records #273

adrianoc opened this issue Mar 25, 2024 · 0 comments
Labels
enhancement New feature or request feature:records wip Work In Progress
Milestone

Comments

@adrianoc
Copy link
Owner

adrianoc commented Mar 25, 2024

Records were introduced in C# 9.0

We should also support record structs introduced in C# 10.

given a record R

Specific for struct records

  • Adds IsReadOnly attribute to all methods and the getter of each added property

Specific for class records

@adrianoc adrianoc changed the title Add support for [records](https://github.com/dotnet/csharplang/blob/main/proposals/csharp-9.0/records.md) Add support for records Mar 25, 2024
@adrianoc adrianoc added the enhancement New feature or request label Mar 29, 2024
@adrianoc adrianoc added this to the 2.12 milestone Mar 29, 2024
@adrianoc adrianoc added the wip Work In Progress label Apr 14, 2024
adrianoc added a commit that referenced this issue Apr 30, 2024
1. Also includes some minor refactorings
2. This work is a preparation for #273 to avoid code duplication
adrianoc added a commit that referenced this issue Apr 30, 2024
this means that a contructor is emmited for the primary constructor
adrianoc added a commit that referenced this issue May 25, 2024
also, only emit properties for constructor parameters that does not match any base constructor parameter
adrianoc added a commit that referenced this issue Jun 9, 2024
1. Also includes some minor refactorings
2. This work is a preparation for #273 to avoid code duplication
adrianoc added a commit that referenced this issue Jun 9, 2024
this means that a contructor is emmited for the primary constructor
adrianoc added a commit that referenced this issue Jun 9, 2024
also, only emit properties for constructor parameters that does not match any base constructor parameter
adrianoc added a commit that referenced this issue Jun 9, 2024
1. Also includes some minor refactorings
2. This work is a preparation for #273 to avoid code duplication
adrianoc added a commit that referenced this issue Jun 9, 2024
this means that a contructor is emmited for the primary constructor
adrianoc added a commit that referenced this issue Jun 9, 2024
also, only emit properties for constructor parameters that does not match any base constructor parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature:records wip Work In Progress
Projects
None yet
Development

No branches or pull requests

1 participant