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

RSRP-469172: Replace comparison (< with >=) does not work on floats, only ints

$
0
0
Reporter Sampsa Lehtonen (snlehton) Sampsa Lehtonen (snlehton)
Created Apr 3, 2018 11:21:17 AM
Updated Apr 9, 2018 8:27:55 PM
Resolved Apr 9, 2018 8:27:55 PM
Subsystem Context Actions
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 EAP 7
VsVersion All Versions

Using "Replace '<' with '>='" refactoring at < works on this:

int a = 0; int b = 1; bool test = !(a < b);

->

int a = 0; int b = 0; bool test = a >= b;

But same refactoring on this:

float a = 0; float b = 1; bool test = !(a < b);

Does nothing. If floating point precision is the problem, I'd rather either not see the refactoring at all, or let me make a conscious decision to perform potentially unsafe refactoring.

Version: RD-173.3994.2442
Timezone: Europe/Helsinki
Evaluation: false
Environment: RD-173.3994.2442, JRE 1.8.0_152-release-1024-b10x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080


Viewing all articles
Browse latest Browse all 106942

Trending Articles



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