Reporter | Kevin Watkins (MrKWatkins) |
---|---|
Created | Nov 7, 2011 2:23:49 PM |
Updated | Mar 27, 2012 5:03:10 PM |
Priority | Normal |
Type | Bug |
Fix versions | 7.0 |
State | Submitted |
Assignee | Alexey Kuptsov (alexey.kuptsov) |
Subsystem | Refactoring |
Affected versions | 6.0, 6.1 |
Fixed in build | No Fixed in build |
If I have the following:
Click on field and then on 'Initialize field from constructor(s) parameter' in the actions list I get the following:
However the constructor should really be protected, not public, because it is an abstract class. In fact ReSharper immediately warns me about this!
public abstract class Class { private readonly string field; }
Click on field and then on 'Initialize field from constructor(s) parameter' in the actions list I get the following:
public abstract class Class { private readonly string field; public Class(string field) { this.field = field; } }
However the constructor should really be protected, not public, because it is an abstract class. In fact ReSharper immediately warns me about this!