Reporter | Lilia Shamsutdinova (Lilia.Shamsutdinova) |
---|---|
Created | Apr 26, 2018 2:43:19 PM |
Updated | Apr 26, 2018 3:22:25 PM |
Subsystem | Quick Fixes |
Assignee | Andrew Karpov (andrew.karpov) |
Priority | Major |
State | Submitted |
Type | Bug |
Fix version | Backlog |
Affected versions | 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
JetBrains ReSharper Ultimate 2018.1.1 12.0.20180425.220038-eap01d.
public class Buggy
{
private readonly string @operator;
private readonly int value;
public Buggy(int value, string @operator)
{
}
}
- Invoke "Initialize field from constructor" QF on
@operator
.
Actual result:
Uncompilable code:
public class Buggy
{
private readonly string @operator;
private readonly int value;
public Buggy(int value, string @operator, string @operator)
{
this.@operator = @operator;
}
}
Expected result:
Compilable code.
NOTE:
The same behavior applies for @void
BUT in case of @int
new parameter with name i
is created:
public Buggy(int value, string @int, string i)
{
this.@int = i;
}