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

RSRP-194190: Qickfix "Return value" breaks code

$
0
0
Reporter Yuri Astrakhan (yurik) Yuri Astrakhan (yurik)
Created Oct 18, 2010 7:36:07 PM
Updated Apr 10, 2018 12:30:44 PM
Resolved Apr 10, 2018 12:30:44 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version No Fix versions
Affected versions 5.1.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
public static int ArrayHashCodeStruct<T>(T[] array)
where T : struct
{
if (array == null)
return 0;

int result = 1;
for (int i = 0; i < array.Length; i++)
result = (result*397) ^ (array[i] == null ? 0 : array[i].GetHashCode());

return result;
}

Applying quick fix on array[i] == null replaces it with
    return result = (result*397) ^ (array[i] == null ? 0 : array[i].GetHashCode());
instead of
    result = (result*397) ^ array[i].GetHashCode();

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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