Copy constructor should not be allowed to omit this initializer call in a type that is not a record #68345
Labels
4 - In Review
A fix for the issue is submitted for review.
Area-Compilers
Bug
New Feature - Primary Constructors
Milestone
According to https://github.com/dotnet/csharplang/blob/main/proposals/primary-constructors.md#primary-constructors-on-records:
A copy-constructor in a record is allowed to not call
this
initializer. However, the compiler also allows it for non-record type with a primary constructor:CS8862 should be reported for the copy constructor as well in this case.
The text was updated successfully, but these errors were encountered: