History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-34890
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Normal Normal
Assignee: Sergey Shkredov
Reporter: Dmitry Shaporenkov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

SafeDelete refactoring incorrectly removes assignments to the 'set' accessor when there is (and is used) a 'get' accessor in implementations

Created: 26 Jan 07 19:03   Updated: 09 Jun 08 23:00
Component/s: Refactorings - Safe Delete
Fix Version/s: None
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
The situation: I have the code like the following:

interface IFoo
{
int Bar { set; }
}

class FooImpl : IFoo
{
public int Bar
{
get { return 0; }
set { Console.WriteLine("Oops"); }
}

static void Main ()

{ FooImpl fooImpl = new FooImpl (); IFoo foo = fooImpl; foo.Bar = 2; Console.WriteLine (fooImpl.Bar); }

}

When I invoke 'Safe Delete' on IFoo.Bar, not only the property declaration gets deleted, but also the 'foo.Bar' statement which is clearly incorrect.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.