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

RSRP-288224: Make Method Non Static Can Generate Non Compiling Code

$
0
0
Reporter Neil Mosafi (nmosafi) Neil Mosafi (nmosafi)
Created Feb 9, 2012 2:52:29 PM
Updated Feb 9, 2012 2:52:29 PM
Priority Normal
Type Unspecified
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
See the following example

public IEnumerable<string> StringifyFoos(IEnumerable<Foo> foos)
{
   return foos.Select(StringifyFoo);
}

public static string StringifyFoo(Foo foo)
{
   return foo.A + " " + foo.B;
}


Say you want to Make the StringifyFoo() method non static, ReSharper will move it into the foo class. But it does not update the line foos.Select(StringifyFoo) so this becomes a compile error. It should change foos.Select(StringifyFoo) to something like foos.Select(foo => StringifyFoo(foo))

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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