Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469411: Incorrect "redundant parentheses" message in rare corner cases

$
0
0
Reporter Friedrich von Never (ForNeVeR) Friedrich von Never (ForNeVeR)
Created Apr 21, 2018 4:50:55 PM
Updated Apr 26, 2018 10:26:14 AM
Subsystem Code Analysis - C#
Assignee Ivan Serduk (IvanSerduk)
Priority Normal
State Submitted
Type Bug
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Consider this code:

        public static void Main() {
int x = 0, y = 0, z = 0, w = 0;
System.Console.WriteLine("{0}{1}", (x < y), z > (w + 1));
}

In this case, Rider tells that the parentheses around (x < y) are redundant. That's not the case, because code becomes invalid. See the screenshots:




It looks like Rider's parser also has problems with this code: it sometimes consider the code as valid and sometimes as invalid.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>