Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-292167: Rename refactoring of anonymous type property with same name as variable can result in broken code

$
0
0
Reporter Joshua McKinney (joshka) Joshua McKinney (joshka)
Created Mar 29, 2012 5:27:28 AM
Updated Mar 29, 2012 5:27:28 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Sergey Shkredov (serjic.shkredov)
Subsystem Refactoring
Affected versions 7.0 Preview
Fixed in build No Fixed in build
Given:
var x = 1;
var p = new {x};
Console.WriteLine(p.x);
Bug 1:
Hitting Ctrl+R,Ctrl+R on the x in the second line results in two context menu items for rename (one for the property named x and one for the variable named x). This menu should allow the user to distinguish between renaming the variable and the property.

Bug 2:
Renaming the variable x (either on line 2 or line 1) does not update the name of the property which results in broken code on line 3.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>