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

RSRP-469105: "Fix floating point comparison" not working with != operator

$
0
0
Reporter Tobias Brohl (tobrohl) Tobias Brohl (tobrohl)
Created Apr 4, 2018 11:00:44 PM
Updated Apr 9, 2018 7:36:53 PM
Resolved Apr 9, 2018 1:29:35 PM
Subsystem Quick Fixes
Assignee Andrew Karpov (andrew.karpov)
Priority Normal
State Fixed
Type Bug
Fix version 2018.1
Affected versions No Affected versions
Fixed In Version ReSharper 2018.1 RTM
VsVersion All Versions

When you type
float f = (float) new Random().NextDouble();
if (f!=float.NaN) {
Console.WriteLine("Valid random");
}
, Rider will suggest to "Fix floating point comparison" when you try to run that refactoring it will throw the following: "Unable to cast object of type 'JetBrains.ReSharper.Psi.CSharp.Impl.Tree.UnaryOperatorExpression' to type 'JetBrains.ReSharper.Psi.CSharp.Tree.IInvocationExpression'." And tells you "Unable to perform this action, most likely because of errors in the code". Log Attached (Private).


Viewing all articles
Browse latest Browse all 106942

Trending Articles



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