Reporter | Andrey Simukov (Andrey.Simukov) |
---|---|
Created | Apr 14, 2018 8:40:17 PM |
Updated | Apr 14, 2018 8:40:17 PM |
Subsystem | Code Analysis - C# |
Assignee | Ivan Serduk (IvanSerduk) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | No Fix versions |
Affected versions | 2017.3.5, 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Reproduced for all the 3 cases below (2017.3.5 and 2018.1 EAP 8).
Without "Remove redundant parentheses" inspection the context action is available:
With "Remove redundant parentheses" inspection the Quick-fix is suggested as well:
public static unsafe byte[] GetBytes(this float obj)
{
float* x = &obj;
var n = (*x).GetBytes();
var m = (*&obj).GetBytes();
var k = (*(float*)&obj).GetBytes();
return n;
}
Without "Remove redundant parentheses" inspection the context action is available:
With "Remove redundant parentheses" inspection the Quick-fix is suggested as well: