Skip to content

Document breaking change for #50755#51754

Merged
cston merged 3 commits intodotnet:mainfrom
cston:50755
Mar 9, 2021
Merged

Document breaking change for #50755#51754
cston merged 3 commits intodotnet:mainfrom
cston:50755

Conversation

@cston
Copy link
Contributor

@cston cston commented Mar 9, 2021

Document breaking change for #50755

@ghost ghost added the Area-Compilers label Mar 9, 2021
@cston cston requested review from a team, jaredpar and jcouv March 9, 2021 01:38
@cston cston marked this pull request as draft March 9, 2021 01:44
@cston cston marked this pull request as ready for review March 9, 2021 02:14
}
```

2. https://github.com/dotnet/roslyn/pull/50755 In .NET 5.0.200 (Visual Studio 16.9), if there is a common type between the two branches of a conditional expression, that type is the type of the conditional expression. This is a breaking change from 5.0.103 (Visual Studio 16.8) which incorrectly used the target type of the conditional expression as the type even if there was a common type between the two branches. This latest change aligns the compiler behavior with the C# specification and with versions of the compiler before .NET 5.0.
Copy link
Member

@jcouv jcouv Mar 9, 2021

Choose a reason for hiding this comment

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

nit: consider breaking line #Resolved

@jcouv jcouv self-assigned this Mar 9, 2021
}
```

2. https://github.com/dotnet/roslyn/pull/50755 In .NET 5.0.200 (Visual Studio 16.9), if there is a common type between the two branches of a conditional expression, that type is the type of the conditional expression. This is a breaking change from 5.0.103 (Visual Studio 16.8) which incorrectly used the target type of the conditional expression as the type even if there was a common type between the two branches. This latest change aligns the compiler behavior with the C# specification and with versions of the compiler before .NET 5.0.
Copy link
Member

@jaredpar jaredpar Mar 9, 2021

Choose a reason for hiding this comment

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

Suggested change
2. https://github.com/dotnet/roslyn/pull/50755 In .NET 5.0.200 (Visual Studio 16.9), if there is a common type between the two branches of a conditional expression, that type is the type of the conditional expression. This is a breaking change from 5.0.103 (Visual Studio 16.8) which incorrectly used the target type of the conditional expression as the type even if there was a common type between the two branches. This latest change aligns the compiler behavior with the C# specification and with versions of the compiler before .NET 5.0.
2. https://github.com/dotnet/roslyn/pull/50755 In .NET 5.0.200 (Visual Studio 16.9), if there is a common type between the two branches of a conditional expression, that type is the type of the conditional expression. This is a breaking change from 5.0.103 (Visual Studio 16.8) which due to a bug incorrectly used the target type of the conditional expression as the type even if there was a common type between the two branches. This latest change aligns the compiler behavior with the C# specification and with versions of the compiler before .NET 5.0.
``` #Resolved

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