csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Chained Assignment Improvement

Open belav opened this issue 3 years ago • 0 comments

When there are enough chained assignments, things break like this.

storedArguments_______[i] =
    localVariables[i] =
    localVariables[i] =
        Expression.Parameter(parameters[i].ParameterType);

But when there aren't enough, you can end up like this

storedArguments_______[i] = localVariables[i] = Expression.Parameter(
    parameters[i].ParameterType
);

I think we should prefer to break the assignments before the InvocationExpression

storedArguments_______[i] =
    localVariables[i] =
        Expression.Parameter(parameters[i].ParameterType);

belav avatar Oct 11 '21 15:10 belav