Fix S1854 FP: Value used in `catch` or `when` should LiveIn for all try blocks
pavel-mikula-sonarsource opened this issue · 0 comments
pavel-mikula-sonarsource commented
Should not raise in complex scenarios related to Roslyn LVA:
public void UsedInFinally()
{
int value = 42; // Noncompliant FP
try
{
SomethingThatCanThrow();
value = 0;
}
catch
{
Use(value);
}
}