-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Description
Version Used:
.NET 11 Preview 1 with VS Insiders 2026 [11513.90]
This is a regression. The problem does not occur using stable .NET 10 and stable VS 2026.
Steps to Reproduce:
A suggestion is offered to convert:
if (_session != null)
{
_session.Disposed -= SessionOnDisposed;
_session = null;
}to:
_session?.Disposed -= SessionOnDisposed;
_session = null;Diagnostic Id:
IDE0031: Null check can be simplified
Expected Behavior:
No suggestion to change the existing code.
Actual Behavior:
A suggestion is offered. We've increased the severity to Warning in Release builds. Combined with warnaserror, this breaks the build.
Reactions are currently unavailable