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

RSRP-104976: Incorrect "Equals" used when converting from the operator ==

$
0
0
Reporter Yuri Astrakhan (yurik) Yuri Astrakhan (yurik)
Created Apr 23, 2009 9:31:13 PM
Updated Apr 6, 2018 1:35:27 PM
Subsystem Context Actions
Assignee Andrew Karpov (andrew.karpov)
Priority Normal
State Open
Type Bug
Fix version 2018.2
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
bool Eq(double a, double b)
{
return a == b;
}

Alt+enter on the operator== offers to convert to Equals, but doing that would convert to the object.Equals(obj a, obj b), which would cause boxing. Instead, it should convert to a.Equals(b), which calls the type-specific strongly-typed method without boxing.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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