Follow-up to #82037, which I can't reopen for some reason.
Version Used: Local build of latest main revision, da6cf36, i.e. already containing the fix #82041.
Steps to Reproduce:
Invoke "Use coalesce expression" on the if statement.
class D
{
public void M()
{
var value = M2();
// Test
if (value == null)
{
throw new InvalidOperationException();
}
}
string? M2() => null;
}
Expected Behavior: The comment is placed before or after the rewritten statement.
Actual Behavior: The comment is dropped.
