Since installing 18.2.4 the Use Expression Bodies code cleanup has been formating passthrough properties to be read only properties.
For a property that allows toggling of sorting of a view I have the following property:
public bool AllowSorting
{
get => m_View.OptionsCustomization.AllowSort;
set => m_View.OptionsCustomization.AllowSort = value;
}
When cleanup is run, it is getting changed to:
public bool AllowSorting => m_View.OptionsCustomization.AllowSort;
this makes the property read only and creates compiler errors:
The only solution I have found is tio disable the cleanup.
Ben,
I have reproduced this issue. Please give us some time to correct it.
It occurs if you have the "Use expression bodies" cleanup rule enabled.
So, as a workaround, disable this rule.
This way you can keep the code cleanup feature enabled.
Follow these steps to get to the Code Cleanup options page:
Editor\C#