roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Inline method doesn't show in simple cases

Open GurGaller opened this issue 2 years ago • 0 comments
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)

GurGaller avatar Apr 25 '23 14:04 GurGaller