Reporter |
|
---|---|
Created | Jan 7, 2019 8:12:39 AM |
Updated | Jan 7, 2019 8:12:39 AM |
Subsystem | Refactorings |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | No Fix versions |
Affected versions | 2018.3.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Branch | No branch |
Write the following code:
using System.ComponentModel;
using System.Runtime.CompilerServices;
using WpfApplication1.Annotations;
namespace WpfApplication1
{
public class Class1 : INotifyPropertyChanged
{
private int _backedProp;
private int _backedProp2;
public int BackedProp
{
get { return _backedProp; }
set { _backedProp = value; }
}
public int BackedProp2
{
get => _backedProp2;
set => _backedProp2 = value;
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Then, select BackedProp
and press Alt-Enter: the action "To property with change notification" will be available (OK).
Select BackedProp2
and press Alt-Enter again: the action "To property with change notification" is not available.
Reproduced on the latest nightly in VS 15.9.4, as well as in Rider:
JetBrains ReSharper Ultimate 2018.3 EAP 11 D Checked Build 183.0.20181231.153315-eap11d
This pre-release version will expire in 13 days
dotCover 2018.3.20190105.93103-eap11d
dotTrace 2018.3.20190105.93301-eap11d
ReSharper C++ 2018.3.20181231.210112-eap11d
TeamCity Add-in 2018.3.20181231.210108-eap11d
ReSharper 2018.3.20181231.154756-eap11d
dotMemory 2018.3.20190105.130151-eap11d