CleanCode icon indicating copy to clipboard operation
CleanCode copied to clipboard

Condition complexity erroneously warns about lambdas with more than one statement

Open cmeeren opened this issue 8 years ago • 0 comments

The following code gives a "Condition expression too complex" warning:

MyFoo.MyEvent += (sender, args) =>
{
    bar = true;
    baz = false;
};

There is no warning if the lambda contains only one statement.

cmeeren avatar Nov 02 '16 10:11 cmeeren