Version Used:
Visual Studio 2026 v18.4.1
.NET 9
Steps to Reproduce:
- See the following minimal code sample:
public static void Test()
{
if (1 == 1) // Does not produce a warning like CS8520
{
Console.WriteLine("Test 1");
}
if (1 is 1) // CS8520
{
Console.WriteLine("Test 1");
}
}
Expected Behavior:
1 == 1 should raise a warning like how 1 is 1 raises CS8520
Actual Behavior:
No warning is raised for 1 == 1