Document breaking change for #46044#51070
Conversation
| @@ -0,0 +1,13 @@ | |||
| ## This document lists known breaking changes in Roslyn in C# 9.0 introduced with .NET 6. | |||
There was a problem hiding this comment.
Consider adding a link for this document in https://github.com/dotnet/docs/blob/main/docs/csharp/whats-new/breaking-changes.md.
| 22. https://github.com/dotnet/roslyn/issues/49596 In *Visual Studio 2019 version 16.9* and greater, conversions from `sbyte` or `short` to `nuint` require explicit casts, | ||
| and binary operations with `sbyte` or `short` and `nuint` arguments require explicit casts for one or both operands for `+`, `-`, `*`, `/`, `%`, `<`, `>`, `<=`, `>=`, `==`, `!=`, `|`, `&`, and `^`. | ||
|
|
||
| 23. https://github.com/dotnet/roslyn/issues/46044 In *Visual Studio 2019 version 16.9* and greater, a warning is reported when assigning `default` to, or when casting a possibly `null` value to a type parameter type that is not constrained to value types or reference types. To avoid the warning, the type can be annotated with `?`. |
There was a problem hiding this comment.
I'm a little bit lost here. The title of this document is:
This document lists known breaking changes in Roslyn in Visual Studio 2019 Update 1 and beyond compared to Visual Studio 2019.
I'm expecting this to be documented in the new file only. Am I missing something?
There was a problem hiding this comment.
Indeed, it looks like we messed up with some recent breaking changes.
The latest file is https://github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/Compiler%20Breaking%20Changes%20-%20DotNet%205.md and corresponds to VS 16.8 / .NET 5.
We should probably start a new file for post-.NET 5.
Youssef1313
left a comment
There was a problem hiding this comment.
A general question: From a time to time, there are PRs that introduces extra nullable warnings in specific contexts. But these were never documented as breaking changes. Why is this specific one special?
| @@ -0,0 +1,13 @@ | |||
| ## This document lists known breaking changes in Roslyn in C# 9.0 introduced with .NET 6. | |||
|
|
|||
| 1. https://github.com/dotnet/roslyn/issues/46044 In C# 9.0 (Visual Studio 16.9), a warning is reported when assigning `default` to, or when casting a possibly `null` value to a type parameter type that is not constrained to value types or reference types. To avoid the warning, the type can be annotated with `?`. | |||
There was a problem hiding this comment.
In C# 9.0 [](start = 49, length = 9)
I think this warning is now produced even for LangVer=8, right? If so we should just say "In Visual Studio 16.9, ..."
I didn't understand why start a new document. There is no .NET 6 yet (we just shipped .NET 5).
Our file structure got a bit confused. The latest file is DotNet 5 (for 16.8). So we could start a new document for post-DotNet 5. #Resolved
There was a problem hiding this comment.
I think this warning is now produced even for LangVer=8, right?
No, the warnings are not reported with /langversion:8.
So we could start a new document for post-DotNet 5.
I've renamed the document to "Compiler Breaking Changes - post DotNet 5.md" based on our discussion.
In reply to: 572483433 [](ancestors = 572483433)
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 1)
|
Marked as draft to make room in review queue. |
Fixes #51050