`RCS1250` fixer cannot handle collection expressions
RenderMichael opened this issue · comments
Product and Version Used:
4.10.0
Before
internal static string[] NotNull(string[]? values)
{
return values ?? [];
}
After
internal static string[] NotNull(string[]? values)
{
return values ?? new string[];
}
Before
internal static string[] MakeNew()
{
string[] values = [];
return values;
}
After
internal static string[] MakeNew()
{
string[] values = new string[]();
return values;
}
Before
internal static string[] MakeNew()
{
string[] values = ["a", "b", "c"];
return values;
}
After
internal static string[] MakeNew()
{
string[] values = new string[]() { "a", "b", "c" };
return values;
}