Version Used: Insiders [11206.111]
No fix is offered on the if like it is if the assignment is changed to simple assignment:
class C
{
event System.Action SomeEvent;
static void M(C c)
{
if (c is not null)
c.SomeEvent += () => { };
}
}
Expected fix:
class C
{
event System.Action SomeEvent;
static void M(C c)
{
c?.SomeEvent += () => { };
}
}