Annoying glitch with verbatim variable prefix

Start with the perfectly valid C# code:

foreach (var group in list.GroupBy(...)){    Debug.Assert(null != group);    ...}

Invoke R#'s "Flip != operands" action on the Debug.Assert line:

Debug.Assert(@group != null);

R# then warns that the "@" verbatim prefix - which it has just inserted! - is redundant, and suggests changing the code to:

Debug.Assert(group != null);

R# 2020.2.4
VS2019 v16.7.5

1 comment
Comment actions Permalink
Official comment

Hello Richard,


thank you for the feedback.

I've filed a corresponding bug report -

Thank you.

Please sign in to leave a comment.