roslynator
roslynator copied to clipboard
Inline method doesn't show in simple cases
trafficstars
Product and Version Used: 4.3.0
Steps to Reproduce:
See the list of available code actions on the call to Square in this snippet:
public static void Main()
{
var squared = Square(5);
}
private static int Square(int x)
{
var result = x * x;
return result;
}
I couldn't get inline-method to work for any function that doesn't begin with a return statement (which is a small minority of functions that can be inlined)