Bug: declarations inside a lambda expression are incorrectly reported (AV1522)
bkoelman opened this issue · comments
Analyzer
AV1522: AssignVariablesInSeparateStatementsAnalyzer
Repro steps
Action act = () =>
{
int iii = 5;
int jjj = 4;
Console.WriteLine(iii);
Console.WriteLine(jjj);
};
Expected behavior
No report of AV1522.
Actual behavior
AV1522 is reported:
'act', 'iii' and 'jjj' are assigned in a single statement.