Skip to content

Update breaking changes document for 17.0 struct initializer fixes#59245

Merged
cston merged 5 commits intodotnet:mainfrom
cston:breaking-changes-initializers
Feb 16, 2022
Merged

Update breaking changes document for 17.0 struct initializer fixes#59245
cston merged 5 commits intodotnet:mainfrom
cston:breaking-changes-initializers

Conversation

@cston
Copy link
Copy Markdown
Contributor

@cston cston commented Feb 3, 2022

Include specific breaking change entries corresponding to #59055.

Also, added anchor tags to each breaking change entry.

@ghost ghost added the Area-Compilers label Feb 3, 2022
@cston cston force-pushed the breaking-changes-initializers branch from ab07432 to 73f1de5 Compare February 3, 2022 19:49
@cston cston marked this pull request as ready for review February 3, 2022 19:51
@cston cston requested a review from a team as a code owner February 3, 2022 19:51
## This document lists known breaking changes in Roslyn in C# 10.0 which will be introduced with .NET 6.

1. Beginning with C# 10.0, null suppression operator is no longer allowed in patterns.
1. <a name="1"></a>Beginning with C# 10.0, null suppression operator is no longer allowed in patterns.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do these anchor tags exist?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To allow links to specific items.

```

4. In Visual Studio 17.1, `struct` type declarations with field initializers must include an explicitly declared constructor. Additionally, all fields must be definitely assigned in `struct` instance constructors that do not have a `: this()` initializer so any previously unassigned fields must be assigned from the added constructor or from field initializers.
4. <a name="4"></a>In Visual Studio 17.0 servicing, an error is reported in a `record struct` with a primary constructor if an explicit constructor has a `this()` initializer that invokes the implicit parameterless constructor.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: consider add links to an issue or PR if it might be useful reference.

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 2)

@jcouv jcouv self-assigned this Feb 11, 2022
Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 5)

@cston cston merged commit 07b1ca2 into dotnet:main Feb 16, 2022
@ghost ghost added this to the Next milestone Feb 16, 2022
@cston cston deleted the breaking-changes-initializers branch February 16, 2022 22:26
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P2 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants