Project
ReSharper
Priority
Normal
Type
Bug
Fix versions
4.5.1
State
Duplicate
Assignee
Sergey Shkredov
Subsystem
No subsystem
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Andrew Serebryansky
    2 years ago (09 Apr 2009 17:24)
  • Updated by   Andrew Serebryansky
    2 years ago (09 Apr 2009 17:33)
  • Jira: RSRP-102898
    (history, comments)
 
RSRP-102898 Rename doesn't handle anonymous types correctly
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
var customerFirstNames = new[] {"Joe", "Peter"}; var customers = from FirstName in customerFirstNames
                select new
                           {
                               FirstName
                           };

foreach(var customer in customers)
{
    Console.WriteLine(customer.FirstName);
}

ReSharper suggests renaming 'FirstName' to 'firstName', but fails to rename the last occurrence

Issue was closed
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Sergey Shkredov
  Sergey Shkredov
09 Apr 2009 17:33
2 years ago
Actually 'last occurrence' is not usage of range variable.
Problem is that rename (inline rename) fails to transform projected anonymous type initializer correctly.
Problem for that has already been created.